ICEfaces
  1. ICEfaces
  2. ICE-7361

ace:dialog - f:ajax call causes additional modal overlay to be added

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1-Beta
    • Fix Version/s: 2.1-Beta2, 3.0
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      ICEfaces 2.1.0 Beta 10142011
    • Assignee Priority:
      P1
    • Affects:
      Compatibility/Configuration
    • Workaround Exists:
      Yes
    • Workaround Description:
      Remove f:ajax tag

      Description

      When clicking on a button that uses the following f:ajax tag:

      <f:ajax execute="@form" render="@form"/>

      An additional modal dialog overlay is displayed. When the dialog is closed this overlay remains. This issue seems to only occur if using the visible attribute to open the popup.

      If using the widgetVar property to open/close the dialog, clicking on the button with the f:ajax tag causes the popup to be closed.

      Attached test case demonstrates both issues.

        Activity

        Hide
        yip.ng added a comment - - edited

        Problems caused by:

        1. Coupling of visible attribute to dialog autoOpen option. autoOpen is a once-only thing, not meant to be a toggle. Long term solution is to decouple visible and autoOpen.

        2. render="@form" creates another dialog instance. How do you find the first instance and close it without getting into an infinite close event loop? Not trivial. There is much more going on in a close than just hiding the dialog and overlay. Also, you want to simulate a close event, not sneakily disturb the component states and HTML and CSS behind the component's back.

        3. User's lack of knowledge or misunderstanding on client-side actions/states. Any state changes caused by client-side actions must be synced with the server if you want to also control the state from the server side.

        Show
        yip.ng added a comment - - edited Problems caused by: 1. Coupling of visible attribute to dialog autoOpen option. autoOpen is a once-only thing, not meant to be a toggle. Long term solution is to decouple visible and autoOpen. 2. render="@form" creates another dialog instance. How do you find the first instance and close it without getting into an infinite close event loop? Not trivial. There is much more going on in a close than just hiding the dialog and overlay. Also, you want to simulate a close event, not sneakily disturb the component states and HTML and CSS behind the component's back. 3. User's lack of knowledge or misunderstanding on client-side actions/states. Any state changes caused by client-side actions must be synced with the server if you want to also control the state from the server side.
        Hide
        yip.ng added a comment - - edited

        See screenshot-01.png for changes required for problem 3. Note that no visible attribute is the same as hard coding visible to false. There is no third state. So the minute you open the dialog using testDlg.show() the dialog is already out of sync with the server.

        Same problem as <ace:panel> expand/collapse state problem I described in email some time ago. For an even simpler demonstration of the problem, see screenshot-02.png of the notification panel demo.

        Show
        yip.ng added a comment - - edited See screenshot-01.png for changes required for problem 3. Note that no visible attribute is the same as hard coding visible to false. There is no third state. So the minute you open the dialog using testDlg.show() the dialog is already out of sync with the server. Same problem as <ace:panel> expand/collapse state problem I described in email some time ago. For an even simpler demonstration of the problem, see screenshot-02.png of the notification panel demo.
        Hide
        yip.ng added a comment - - edited

        Fixed. Note that these are general problems applicable to all components. They just show up more glaringly in dialog because of the unfortunate coupling of visible and autoOpen, and the added complexity of the overlay. If we continue to want the components to be more sever-side-oriented like in 1.8, there will be a lot more of these fixes to do.

        Revision: 26185


        Modified : /icefaces-ee/scratchpads/grimlock/icefaces/ace/component/resources/icefaces.ace/dialog/dialog.js
        Modified : /icefaces-ee/scratchpads/grimlock/icefaces/ace/component/src/org/icefaces/ace/component/dialog/DialogRenderer.java

        Command: Commit
        Modified: C:\svn\ossrepo\icefaces-ee\tags\icefaces-2.1.0.BETA2\icefaces\ace\component\resources\icefaces.ace\dialog\dialog.js
        Modified: C:\svn\ossrepo\icefaces-ee\tags\icefaces-2.1.0.BETA2\icefaces\ace\component\src\org\icefaces\ace\component\dialog\DialogRenderer.java
        Completed: At revision: 26189

        Show
        yip.ng added a comment - - edited Fixed. Note that these are general problems applicable to all components. They just show up more glaringly in dialog because of the unfortunate coupling of visible and autoOpen, and the added complexity of the overlay. If we continue to want the components to be more sever-side-oriented like in 1.8, there will be a lot more of these fixes to do. Revision: 26185 Modified : /icefaces-ee/scratchpads/grimlock/icefaces/ace/component/resources/icefaces.ace/dialog/dialog.js Modified : /icefaces-ee/scratchpads/grimlock/icefaces/ace/component/src/org/icefaces/ace/component/dialog/DialogRenderer.java Command: Commit Modified: C:\svn\ossrepo\icefaces-ee\tags\icefaces-2.1.0.BETA2\icefaces\ace\component\resources\icefaces.ace\dialog\dialog.js Modified: C:\svn\ossrepo\icefaces-ee\tags\icefaces-2.1.0.BETA2\icefaces\ace\component\src\org\icefaces\ace\component\dialog\DialogRenderer.java Completed: At revision: 26189
        Hide
        yip.ng added a comment - - edited

        ICE-7388, ICE-7506, ICE-7601.

        Show
        yip.ng added a comment - - edited ICE-7388, ICE-7506 , ICE-7601 .

          People

          • Assignee:
            yip.ng
            Reporter:
            Arran Mccullough
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: