ICEfaces
  1. ICEfaces
  2. ICE-6178

Support singleSubmit on compat components

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-Beta1
    • Fix Version/s: 2.0.0
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      ICEfaces 2.0
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.), Sample App./Tutorial, Compatibility/Configuration

      Description


      Typical ICEfaces 2.0 applications will contain pages with a mixture of h: component with singleSubmit and compat components. The expected behavior from the page developer's point of view will be that the compat components also support singleSubmit. For instance, singleSubmit does not run validators for non-submitting components, whereas partialSubmit does.

      The expectation is that users will either use "partialSubmit" if they have an existing code-base written to use it, or else they would use "singleSubmit" tag instead. Using both at the same time is not supported.

      The first task for this is to develop test cases that will indicate the current level of support within the compat components for singleSubmit. Basically, a set of pages that use each compat component inside a form with a "singleSubmit=true" tag, and partialSubmit=false on each component.



        Activity

        Hide
        Ted Goddard added a comment - - edited

        Selection: this is due to the "execute" restriction: by only executing one of the checkboxes, the state of the others is ignored.

        Text Entry: again due to the "execute" restriction: FacesMessages are retained across lifecycles, so are still displayed, but only the one input component is executed, so the previous errors are actually ignored.

        Collapsible Panel: the following change allows Collapsible Panel to work. The "source" is apparently not being set by singleSubmit, resulting in the UI Blocker becoming confused. The UI Blocker should be made more robust, but it should also be determined why the source of the event is null.

        var stopBlockingUI = noop;
        namespace.onBeforeSubmit(function(source) {
        //don't block UI for the retrieveUpdate requests
        if (null != source && viewIDOf(source) != source.id && isBlockUIEnabled(source)) {

        In this case, it looks like JSF is providing a null "source" to the listener (UI Blocker):

        jsf.ajax.addOnEvent(function(e) {
        switch (e.status)

        { case 'begin': broadcast(beforeSubmitListeners, [ e.source ]); break; case 'complete': broadcast(beforeUpdateListeners, [ e.responseXML ]); break; case 'success': broadcast(afterUpdateListeners, [ e.responseXML ]); break; }

        });

        Show
        Ted Goddard added a comment - - edited Selection: this is due to the "execute" restriction: by only executing one of the checkboxes, the state of the others is ignored. Text Entry: again due to the "execute" restriction: FacesMessages are retained across lifecycles, so are still displayed, but only the one input component is executed, so the previous errors are actually ignored. Collapsible Panel: the following change allows Collapsible Panel to work. The "source" is apparently not being set by singleSubmit, resulting in the UI Blocker becoming confused. The UI Blocker should be made more robust, but it should also be determined why the source of the event is null. var stopBlockingUI = noop; namespace.onBeforeSubmit(function(source) { //don't block UI for the retrieveUpdate requests if (null != source && viewIDOf(source) != source.id && isBlockUIEnabled(source)) { In this case, it looks like JSF is providing a null "source" to the listener (UI Blocker): jsf.ajax.addOnEvent(function(e) { switch (e.status) { case 'begin': broadcast(beforeSubmitListeners, [ e.source ]); break; case 'complete': broadcast(beforeUpdateListeners, [ e.responseXML ]); break; case 'success': broadcast(afterUpdateListeners, [ e.responseXML ]); break; } });
        Hide
        Ted Goddard added a comment -

        Test results provided by Mandeep:

        Selection value are updated only when user interact with another component on the page. for example 'select car' value is updated when user interacts with the drink radio buttons
        TextEntry comments value is displayed even when there are errors in name & password
        Popup Calendar: value are no submitted right away. for example change 'selection pattern' for popup calendar, notice change is not applied to the date value. now click anywhere on the page, notice the date value is updated according to the 'selection pattern'
        Menu Bar: selection is not always submitted. try selecting a few time in Menu Bar. also try to change orientation
        Progress Bar: label alignment cannot be changed dynamically. Start progress, now change the alignment, alignment change does not take effect
        Download Resources: does not work
        Media: changing media type does not always work
        Set Event Phase: Select a country, its cities list is not populated. now cick anywhere in the page. corresponding cities list is now populated
        Columns: change the number of columns, the table is not updated. now click anywhere in the pg, table is updated according to the number of columns
        DataPaginator: change the radio button selection from paging to scrolling, not changes are applied to the page. Now click anywhere on the page, the changes are applied to the page
        Position Panel: '<!-- 969-->' redundant text is displayed above the position panel component
        GMap: deselect 'show control' no changes are applied to the page. now deselect 'show markers' controls are removed from gmap but markers are still displayed
        Charts: change the type of chart selection, no changes are applied to the page, now click anywhere on the page, notice the changes are applied to the page.
        Collapsible Panel: only first interaction with the component page works

        Show
        Ted Goddard added a comment - Test results provided by Mandeep: Selection value are updated only when user interact with another component on the page. for example 'select car' value is updated when user interacts with the drink radio buttons TextEntry comments value is displayed even when there are errors in name & password Popup Calendar: value are no submitted right away. for example change 'selection pattern' for popup calendar, notice change is not applied to the date value. now click anywhere on the page, notice the date value is updated according to the 'selection pattern' Menu Bar: selection is not always submitted. try selecting a few time in Menu Bar. also try to change orientation Progress Bar: label alignment cannot be changed dynamically. Start progress, now change the alignment, alignment change does not take effect Download Resources: does not work Media: changing media type does not always work Set Event Phase: Select a country, its cities list is not populated. now cick anywhere in the page. corresponding cities list is now populated Columns: change the number of columns, the table is not updated. now click anywhere in the pg, table is updated according to the number of columns DataPaginator: change the radio button selection from paging to scrolling, not changes are applied to the page. Now click anywhere on the page, the changes are applied to the page Position Panel: '<!-- 969-->' redundant text is displayed above the position panel component GMap: deselect 'show control' no changes are applied to the page. now deselect 'show markers' controls are removed from gmap but markers are still displayed Charts: change the type of chart selection, no changes are applied to the page, now click anywhere on the page, notice the changes are applied to the page. Collapsible Panel: only first interaction with the component page works
        Hide
        Mandeep Hayher added a comment -

        ice-6178\icefaces revision# 23297
        Server: Tomcat6
        Bowser: FF3.6

        Note: sometimes during testing the application stopped responding, had to reload to make application work again.

        problem common with keyboard test and mouse test:
        Button & Link: inputtext field had partial submit enable( it should be disabled)

        Keyboard test problems:
        TextEntry: keyboard can be used fine(known issue with displaying comments even when username & password have errors)
        Button & Links:
        reset button does not work on pressing enter key
        command link does not work on pressing enter key
        output link does not work on pressing enter key
        selection:
        select cars(list): down arrow key can be used only once, after that the arrow keys start moving the scroll bar of the page
        drink(radio button): can be selected only once by arrow key, after that the focus goes back to entire page
        language (checkbox): selections can be made by key board, but output is displayed for the last selected item only(known issue)
        select country & cities: down arrow key can be used only once, after that the arrow keys start moving the scroll bar of the page
        Calendar: can not select dated by keyboard, cannot open poup calendar
        Charts: can not change chart type more than once by using the keyboard
        Download Resources: can navigate everything but cannot download anything with enter key
        Effects: can not do anything with keyboard
        Gmap: can search address & cities fine, checkboxes work ok too, but cannot tab into the map to use its controller (not sure if that possible)
        media: can change radio button selection only once
        MenuBar: can navigate the menubar fine but cannot select anything by pressing enter key
        SetEventphase: can change selections only once by using arrow keys
        Tree: can not do anything with the keyboard
        Columns: can change the number of coulmns only once
        Datapagintor: can not use keyboard to navigate datatpaginator pages
        Expandable table: can not collapse or expand table by using keyboard
        Sortable table: can not change sort by using keyboard
        Row Selection: can not select any row with keyboard
        DataExporter: can not get anything to work with keyboard
        Stacking panel: can change radio button selection only once
        Collapsible Panel: cannot expand or collapse panel by using keybaord
        Confirmation Panel: the dat can be save by using the keyboard but confirmation panel is nto displayed before saving. Can not delete any data by using keyboard.

        Not valid for testing using keyboard
        Tooltip
        Position Panel
        SplitPanel
        Resizable column
        Richtext
        menuPopup

        Show
        Mandeep Hayher added a comment - ice-6178\icefaces revision# 23297 Server: Tomcat6 Bowser: FF3.6 Note: sometimes during testing the application stopped responding, had to reload to make application work again. problem common with keyboard test and mouse test: Button & Link: inputtext field had partial submit enable( it should be disabled) Keyboard test problems: TextEntry: keyboard can be used fine(known issue with displaying comments even when username & password have errors) Button & Links: reset button does not work on pressing enter key command link does not work on pressing enter key output link does not work on pressing enter key selection: select cars(list): down arrow key can be used only once, after that the arrow keys start moving the scroll bar of the page drink(radio button): can be selected only once by arrow key, after that the focus goes back to entire page language (checkbox): selections can be made by key board, but output is displayed for the last selected item only(known issue) select country & cities: down arrow key can be used only once, after that the arrow keys start moving the scroll bar of the page Calendar: can not select dated by keyboard, cannot open poup calendar Charts: can not change chart type more than once by using the keyboard Download Resources: can navigate everything but cannot download anything with enter key Effects: can not do anything with keyboard Gmap: can search address & cities fine, checkboxes work ok too, but cannot tab into the map to use its controller (not sure if that possible) media: can change radio button selection only once MenuBar: can navigate the menubar fine but cannot select anything by pressing enter key SetEventphase: can change selections only once by using arrow keys Tree: can not do anything with the keyboard Columns: can change the number of coulmns only once Datapagintor: can not use keyboard to navigate datatpaginator pages Expandable table: can not collapse or expand table by using keyboard Sortable table: can not change sort by using keyboard Row Selection: can not select any row with keyboard DataExporter: can not get anything to work with keyboard Stacking panel: can change radio button selection only once Collapsible Panel: cannot expand or collapse panel by using keybaord Confirmation Panel: the dat can be save by using the keyboard but confirmation panel is nto displayed before saving. Can not delete any data by using keyboard. Not valid for testing using keyboard Tooltip Position Panel SplitPanel Resizable column Richtext menuPopup
        Hide
        Ted Goddard added a comment -

        Modifying application.js to use the following allows focus to be retained in component-showcase:

        jsf.ajax.request(element, event,

        {render: "@all"}

        );
        // ice.se(e, element);

        The root cause of loss of focus appears to be the following in submit.js:

        //move element from its original place into the single submit form
        form.appendChild(element);

        Moving the element that is currently focused by the user is likely the source of the problem. Using innerHtml may be an option for cloning the element if DOM APIs are not suitable.

        Show
        Ted Goddard added a comment - Modifying application.js to use the following allows focus to be retained in component-showcase: jsf.ajax.request(element, event, {render: "@all"} ); // ice.se(e, element); The root cause of loss of focus appears to be the following in submit.js: //move element from its original place into the single submit form form.appendChild(element); Moving the element that is currently focused by the user is likely the source of the problem. Using innerHtml may be an option for cloning the element if DOM APIs are not suitable.
        Hide
        Ted Goddard added a comment -

        ICE-6340 focuses on focus issue.

        Show
        Ted Goddard added a comment - ICE-6340 focuses on focus issue.

          People

          • Assignee:
            Mandeep Hayher
            Reporter:
            Ted Goddard
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: