ICEfaces-EE
  1. ICEfaces-EE
  2. IPCK-202

Dual LIst single Submit causing double value copy

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-2.0.0.Alpha1
    • Fix Version/s: EE-2.0.0.Beta1
    • Component/s: Facelet Components
    • Labels:
      None
    • Environment:
      ICEfaces EE comp showcase

      Description

      The issue only shows up when single submit has been enabled for the application. When partial submit is enabled the demo and component work as expected.

      Environment
      Make sure the context param com.icesoft.faces.application.showcase.submitMode.singleSubmit=true.

      Test Case
      move one item from available to selected list (orange)
      now click on next item in available list (apple)
      Notice although the user did not move second item another item is displayed in the selected list (orange is displayed twice)

        Issue Links

          Activity

          Hide
          Patrick Corless added a comment -

          Ken, this is an interesting bug, as the composite component is quite simple. I haven't looked at it in detail yet but definitely warrants some attention as it is only a problem when singleSubmit is enabled.

          Show
          Patrick Corless added a comment - Ken, this is an interesting bug, as the composite component is quite simple. I haven't looked at it in detail yet but definitely warrants some attention as it is only a problem when singleSubmit is enabled.
          Hide
          Carlo Guglielmin added a comment -

          Upon further investigation I think this behaviour is limited to ice:selectManyListbox specifically, and how singleSubmit interacts with it. We just happened to see it demonstrated in the dualList composite component.

          I tested with a blank ice:selectManyListbox in a simple page with singleSubmit enabled and two POSTs were sent to the server. In the case of dualList this means the add actionListener is called twice.

          So when I click the ice:selectManyListbox (regardless of if it's in a composite component or on it's own) an expected POST is done to the server that looks like this:

          iceform=iceform&ice.window=m8gjg6egid&ice.view=vdawc31&iceform%3Aicepnltabset%3A0%3Aj_idt60Expanded=&iceform%3Aicepnltabset%3A0%3Aj_idt67Expanded=&iceform%3Aicepnltabset%3A0%3AdualListDemo_leftList=Grapefruit&icefacesCssUpdates=&iceform%3Aj_idcl=&javax.faces.ViewState=-6134776949808937328%3A275458056476100104&javax.faces.source=iceform%3Aicepnltabset%3A0%3AdualListDemo_addBtn&javax.faces.partial.event=click&javax.faces.partial.execute=%40all&javax.faces.partial.render=%40all&ice.window=m8gjg6egid&ice.view=vdawc31&ice.focus=iceform%3Aicepnltabset%3A0%3AdualListDemo_addBtn&iceform%3Aicepnltabset%3A0%3AdualListDemo_addBtn=&ice.event.target=iceform%3Aicepnltabset%3A0%3AdualListDemo_addBtn&ice.event.captured=iceform%3Aicepnltabset%3A0%3AdualListDemo_addBtn&ice.event.type=onclick&ice.event.alt=false&ice.event.ctrl=false&ice.event.shift=false&ice.event.meta=false&ice.event.x=857&ice.event.y=471&ice.event.left=true&ice.event.right=false&ice.submit.type=ice.s&ice.submit.serialization=form&javax.faces.partial.ajax=true
          (apologies for the formatting)

          Nothing unexpected here.

          However then I click ANYWHERE else in the page, and a second POST is done. I can click to select a different item, I can click to expand the header, or I can flat out click on the empty background space of the page. When I do that the second POST fires, which looks like this:

          vdawc31=vdawc31&icefacesCssUpdates=&javax.faces.ViewState=-6134776949808937328%3A275458056476100104&javax.faces.source=iceform%3Aicepnltabset%3A0%3AdualListDemo_addBtn&javax.faces.partial.execute=iceform%3Aicepnltabset%3A0%3AdualListDemo_addBtn&javax.faces.partial.render=%40all&ice.window=m8gjg6egid&ice.view=vdawc31&ice.focus=&iceform%3Aicepnltabset%3A0%3AdualListDemo_addBtn=&ice.event.target=iceform%3Aicepnltabset%3A0%3AdualListDemo_addBtn&ice.event.captured=iceform%3Aicepnltabset%3A0%3AdualListDemo_addBtn&ice.event.type=onunknown&ice.submit.type=ice.se&ice.submit.serialization=element&javax.faces.partial.ajax=true

          With dualList this manifest as calling the add actionListener twice. The important info to take from the above POST is:

          ice.event.type=onunknown

          So it looks like ice:selectManyListbox is firing an unknown event at some point and singleSubmit picks it up and does another POST.

          Show
          Carlo Guglielmin added a comment - Upon further investigation I think this behaviour is limited to ice:selectManyListbox specifically, and how singleSubmit interacts with it. We just happened to see it demonstrated in the dualList composite component. I tested with a blank ice:selectManyListbox in a simple page with singleSubmit enabled and two POSTs were sent to the server. In the case of dualList this means the add actionListener is called twice. So when I click the ice:selectManyListbox (regardless of if it's in a composite component or on it's own) an expected POST is done to the server that looks like this: iceform=iceform&ice.window=m8gjg6egid&ice.view=vdawc31&iceform%3Aicepnltabset%3A0%3Aj_idt60Expanded=&iceform%3Aicepnltabset%3A0%3Aj_idt67Expanded=&iceform%3Aicepnltabset%3A0%3AdualListDemo_leftList=Grapefruit&icefacesCssUpdates=&iceform%3Aj_idcl=&javax.faces.ViewState=-6134776949808937328%3A275458056476100104&javax.faces.source=iceform%3Aicepnltabset%3A0%3AdualListDemo_addBtn&javax.faces.partial.event=click&javax.faces.partial.execute=%40all&javax.faces.partial.render=%40all&ice.window=m8gjg6egid&ice.view=vdawc31&ice.focus=iceform%3Aicepnltabset%3A0%3AdualListDemo_addBtn&iceform%3Aicepnltabset%3A0%3AdualListDemo_addBtn=&ice.event.target=iceform%3Aicepnltabset%3A0%3AdualListDemo_addBtn&ice.event.captured=iceform%3Aicepnltabset%3A0%3AdualListDemo_addBtn&ice.event.type=onclick&ice.event.alt=false&ice.event.ctrl=false&ice.event.shift=false&ice.event.meta=false&ice.event.x=857&ice.event.y=471&ice.event.left=true&ice.event.right=false&ice.submit.type=ice.s&ice.submit.serialization=form&javax.faces.partial.ajax=true (apologies for the formatting) Nothing unexpected here. However then I click ANYWHERE else in the page, and a second POST is done. I can click to select a different item, I can click to expand the header, or I can flat out click on the empty background space of the page. When I do that the second POST fires, which looks like this: vdawc31=vdawc31&icefacesCssUpdates=&javax.faces.ViewState=-6134776949808937328%3A275458056476100104&javax.faces.source=iceform%3Aicepnltabset%3A0%3AdualListDemo_addBtn&javax.faces.partial.execute=iceform%3Aicepnltabset%3A0%3AdualListDemo_addBtn&javax.faces.partial.render=%40all&ice.window=m8gjg6egid&ice.view=vdawc31&ice.focus=&iceform%3Aicepnltabset%3A0%3AdualListDemo_addBtn=&ice.event.target=iceform%3Aicepnltabset%3A0%3AdualListDemo_addBtn&ice.event.captured=iceform%3Aicepnltabset%3A0%3AdualListDemo_addBtn&ice.event.type=onunknown&ice.submit.type=ice.se&ice.submit.serialization=element&javax.faces.partial.ajax=true With dualList this manifest as calling the add actionListener twice. The important info to take from the above POST is: ice.event.type=onunknown So it looks like ice:selectManyListbox is firing an unknown event at some point and singleSubmit picks it up and does another POST.
          Hide
          Carlo Guglielmin added a comment -

          Also note the double POST doesn't happen with h:selectManyListbox, just the ice: version. I thought h: components still took part in singleSubmit, so maybe just the ICEfaces selectManyListbox renderer is the problem.

          Show
          Carlo Guglielmin added a comment - Also note the double POST doesn't happen with h:selectManyListbox, just the ice: version. I thought h: components still took part in singleSubmit, so maybe just the ICEfaces selectManyListbox renderer is the problem.
          Hide
          Carlo Guglielmin added a comment -

          Further testing was done by explicitly setting partialSubmit="false" on the selectManyListbox. The same double POST happened though. This attempt was done in case the problem components automatically toggled partialSubmit.

          Show
          Carlo Guglielmin added a comment - Further testing was done by explicitly setting partialSubmit="false" on the selectManyListbox. The same double POST happened though. This attempt was done in case the problem components automatically toggled partialSubmit.
          Hide
          Patrick Corless added a comment -

          Once you hear back from Ted, please test and clean up as needed.

          Show
          Patrick Corless added a comment - Once you hear back from Ted, please test and clean up as needed.
          Hide
          Ted Goddard added a comment -

          This is only reproducible on IE, is that what you observe?

          Show
          Ted Goddard added a comment - This is only reproducible on IE, is that what you observe?
          Hide
          Carlo Guglielmin added a comment -

          I was seeing this on Firefox 3.6.13 on Linux as well.

          Show
          Carlo Guglielmin added a comment - I was seeing this on Firefox 3.6.13 on Linux as well.
          Hide
          Ted Goddard added a comment -

          Confirmed in Firefox 3.6 and IE 7. Problem does not occur with Safari, Chrome, or Firefox 4.

          Show
          Ted Goddard added a comment - Confirmed in Firefox 3.6 and IE 7. Problem does not occur with Safari, Chrome, or Firefox 4.
          Hide
          Carlo Guglielmin added a comment -

          ICE-6470 was fixed in the ICEfaces 2 trunk, and as a result this problem has been resolved.

          Show
          Carlo Guglielmin added a comment - ICE-6470 was fixed in the ICEfaces 2 trunk, and as a result this problem has been resolved.

            People

            • Assignee:
              Carlo Guglielmin
              Reporter:
              Patrick Corless
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: