ICEfaces
  1. ICEfaces
  2. ICE-7282

ace:dialog - closeListener needs to be implemented

    Details

    • Type: Improvement Improvement
    • 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:
      All
    • Assignee Priority:
      P1
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.), Sample App./Tutorial
    • Workaround Exists:
      Yes
    • Workaround Description:
      Implement your own close button that can call the server side.

      Description

      Currently there is no way to tell the server side that a dialog has been closed via the header close button. The closeListener should be implemented so that the server side can be notified that the popup is closed.

      At the moment this can cause an issue where the dialog is closed via the close button and cannot be opened again because the server side still thinks that its open.

        Activity

        Hide
        Arran Mccullough added a comment -

        I've tried adding this call in a basic test case. Adding the ace:ajax tag seems to be causing some errors on the client side. Attached is a basic test case that I'm using.

        Show
        Arran Mccullough added a comment - I've tried adding this call in a basic test case. Adding the ace:ajax tag seems to be causing some errors on the client side. Attached is a basic test case that I'm using.
        Hide
        yip.ng added a comment - - edited

        No error, just some warning, and the dialog disappears on its own. See video at http://screencast.com/t/dJmyvmP5oEt.

        Warning is: "Use of getAttributeNode() is deprecated. Use getAttribute() instead." See screenshot 1. Shouldn't be a problem? And it doesn't tell you where the warning is from.

        Log shows close listener was called successfully. See screenshot 2.

        So the close event mechanism works OK. We just have to figure out why the dialog just closes by itself.

        Show
        yip.ng added a comment - - edited No error, just some warning, and the dialog disappears on its own. See video at http://screencast.com/t/dJmyvmP5oEt . Warning is: "Use of getAttributeNode() is deprecated. Use getAttribute() instead." See screenshot 1. Shouldn't be a problem? And it doesn't tell you where the warning is from. Log shows close listener was called successfully. See screenshot 2. So the close event mechanism works OK. We just have to figure out why the dialog just closes by itself.
        Hide
        Arran Mccullough added a comment -

        Thanks Yip, the error I am getting pertains to not finding the google map key or something along those lines. May not be a real issue though. I've attached a screen shot for reference.

        I don't see the automatic close in my test case though. Clicking on the open button opens the popup but I seem to get stuck in an infinite loop of requests, possibly this may be a configuration issue or it may be the same issue that is causing the popup to close on your end.

        It may also be an issue as to how the ace:ajax tag is being used. I played around with some of the attributes but I wasn't able to get it to work properly.

        Show
        Arran Mccullough added a comment - Thanks Yip, the error I am getting pertains to not finding the google map key or something along those lines. May not be a real issue though. I've attached a screen shot for reference. I don't see the automatic close in my test case though. Clicking on the open button opens the popup but I seem to get stuck in an infinite loop of requests, possibly this may be a configuration issue or it may be the same issue that is causing the popup to close on your end. It may also be an issue as to how the ace:ajax tag is being used. I played around with some of the attributes but I wasn't able to get it to work properly.
        Hide
        yip.ng added a comment - - edited

        Tested in williamspoc by just copying the <ace:ajax> markup. It seems to work fine. See video at http://screencast.com/t/xaL2O4g8s and screenshots 4 and 5.

        So this must be some config. issue(s)?

        Show
        yip.ng added a comment - - edited Tested in williamspoc by just copying the <ace:ajax> markup. It seems to work fine. See video at http://screencast.com/t/xaL2O4g8s and screenshots 4 and 5. So this must be some config. issue(s)?
        Hide
        Arran Mccullough added a comment -

        Removing the gmap gets rid of the error but I now see the issue where it is closed right away. The firebug console shows that all the resources (Javascript/CSS/etc) continuously get called.

        I think the reason why the POC works is that the dialog is mainly controlled by JavaScript. It is opened by the onclick call and not the change of the visible attribute on the server side.

        I did a quick test in integrating the ace:ajax tag into their app and i could see the same behavior that I see in my test case. With my test case, clicking on a button that shows the dialog show the dialog for a second and then the close listener is called, this closing the dialog. Possibly this is a case where the ace:ajax tag is not being used properly since it seems to be called when the dialog is opened.

        Show
        Arran Mccullough added a comment - Removing the gmap gets rid of the error but I now see the issue where it is closed right away. The firebug console shows that all the resources (Javascript/CSS/etc) continuously get called. I think the reason why the POC works is that the dialog is mainly controlled by JavaScript. It is opened by the onclick call and not the change of the visible attribute on the server side. I did a quick test in integrating the ace:ajax tag into their app and i could see the same behavior that I see in my test case. With my test case, clicking on a button that shows the dialog show the dialog for a second and then the close listener is called, this closing the dialog. Possibly this is a case where the ace:ajax tag is not being used properly since it seems to be called when the dialog is opened.
        Hide
        yip.ng added a comment - - edited

        Looks like the enhancement made in ICE-7216 has some adverse effects with the close event handling mechanism.

        "visible", i.e. "autoOpen" in jQuery, was never meant to be used to open and close the dialog. Dialog is a client-side component. By trying to make "visible" work like our old components, we are forcing it to work like server side components. Bound to have conflicts and complications.

        Still trying out other ways of re-doing ICE-7216 that will also work with this use case. So far no luck.

        Show
        yip.ng added a comment - - edited Looks like the enhancement made in ICE-7216 has some adverse effects with the close event handling mechanism. "visible", i.e. "autoOpen" in jQuery, was never meant to be used to open and close the dialog. Dialog is a client-side component. By trying to make "visible" work like our old components, we are forcing it to work like server side components. Bound to have conflicts and complications. Still trying out other ways of re-doing ICE-7216 that will also work with this use case. So far no luck.
        Hide
        yip.ng added a comment -

        Fixed. See video at http://screencast.com/t/Fd0fpE9jj5.

        Revision: 25836


        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

        Show
        yip.ng added a comment - Fixed. See video at http://screencast.com/t/Fd0fpE9jj5 . Revision: 25836 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

          People

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

            Dates

            • Created:
              Updated:
              Resolved: