ICEfaces
  1. ICEfaces
  2. ICE-1594

ice:panelPopup component doesn't work as a portlet under Liferay

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6DR#4
    • Fix Version/s: 1.7DR#1, 1.7
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      WinXP / Tomcat 5.5.17 / Liferay 4.3.0 (pre-release)

      Description

      I took the source code from the "Panel Popup" part of the component showcase and turned it into a portlet for testing purposes.

      There are several problems:

      1. The modal popup does not appear as the topmost window
      2. The modal popup does not grey-out the rendered browser page under it
      3. The modal popup window does not take control over the entire browser window
      4. The draggable panel renders but is not draggable
      5. The "Close" button on the draggable panel does not close the draggable panel

        Activity

        Neil Griffin created issue -
        Hide
        Neil Griffin added a comment -
        • Extract this .ZIP in the Tomcat "webapps" folder of Liferay 4.3.0 (pre-release built from Liferay trunk)
        • It will create a folder in webapps named:
          icefaces-test-popup-portlet.war
        • Start Liferay
        • Add the portlet to a page (found under "Test" category)
        • Click on the checkboxes, buttons, and panels to reproduce the errors
        Show
        Neil Griffin added a comment - Extract this .ZIP in the Tomcat "webapps" folder of Liferay 4.3.0 (pre-release built from Liferay trunk) It will create a folder in webapps named: icefaces-test-popup-portlet.war Start Liferay Add the portlet to a page (found under "Test" category) Click on the checkboxes, buttons, and panels to reproduce the errors
        Neil Griffin made changes -
        Field Original Value New Value
        Attachment icefaces-test-popup-portlet.zip [ 10404 ]
        Hide
        Neil Griffin added a comment -

        Forgot to mention that IE reports a JavaScript error on page load, but FireFox does not.

        Here is the IE error message:

        Line 295
        Char 26
        Error: 'Ice.modal' is null or not an object
        Code: 0

        Show
        Neil Griffin added a comment - Forgot to mention that IE reports a JavaScript error on page load, but FireFox does not. Here is the IE error message: Line 295 Char 26 Error: 'Ice.modal' is null or not an object Code: 0
        Adnan Durrani made changes -
        Assignee Adnan Durrani [ adnan.durrani ]
        Hide
        Adnan Durrani added a comment -

        The bug has been fixed -revision 13930
        We have tested it under Servlets environment, it is working fine. However it needs to be tested in portlet environment.

        Show
        Adnan Durrani added a comment - The bug has been fixed -revision 13930 We have tested it under Servlets environment, it is working fine. However it needs to be tested in portlet environment.
        Adnan Durrani made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Hide
        Neil Griffin added a comment -

        Adnan,

        It is still broken for portlets.

        Deryk wrote via IM: "Some of our 'ice-extra.js' is not being applied"

        with regard to portlets.

        Neil

        Show
        Neil Griffin added a comment - Adnan, It is still broken for portlets. Deryk wrote via IM: "Some of our 'ice-extra.js' is not being applied" with regard to portlets. Neil
        Hide
        Adnan Durrani added a comment -

        Seems like it is some different issue, the fix we had was for the following JIRA case:
        http://jira.icefaces.org//browse/ICE-1598

        Show
        Adnan Durrani added a comment - Seems like it is some different issue, the fix we had was for the following JIRA case: http://jira.icefaces.org//browse/ICE-1598
        Hide
        Adnan Durrani added a comment -

        Neil,

        My apology, the fix was for some other issue, related to the panelPopup component. Dyerk is working on this issue.

        Thanks,
        Adnan

        Show
        Adnan Durrani added a comment - Neil, My apology, the fix was for some other issue, related to the panelPopup component. Dyerk is working on this issue. Thanks, Adnan
        Adnan Durrani made changes -
        Assignee Adnan Durrani [ adnan.durrani ] Deryk Sinotte [ deryk.sinotte ]
        Hide
        Deryk Sinotte added a comment -

        It appears that the ice-extras.js file is not being included. The logic for JavaScriptContext to add extra libraries (putting them in the HEAD) is not executed for portlets as they are treated as included fragments. Adding this library in seems to solve most of the issues outlined above. A possible work around is to manually add a script tag to the portlet page that needs this ice-extras.js code.

        Show
        Deryk Sinotte added a comment - It appears that the ice-extras.js file is not being included. The logic for JavaScriptContext to add extra libraries (putting them in the HEAD) is not executed for portlets as they are treated as included fragments. Adding this library in seems to solve most of the issues outlined above. A possible work around is to manually add a script tag to the portlet page that needs this ice-extras.js code.
        Hide
        Deryk Sinotte added a comment -

        Okay...manually adding in the script tag doesn't work but some experimental code seemed to indicate that most of the problems are handled if the extras library is included so we'll concentrate on that.

        Show
        Deryk Sinotte added a comment - Okay...manually adding in the script tag doesn't work but some experimental code seemed to indicate that most of the problems are handled if the extras library is included so we'll concentrate on that.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #13936 Tue May 22 10:15:10 MDT 2007 deryk.sinotte ICE-1594 writing out ice-extras.js script tag for all fragment/portlet serialization
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/context/NormalModeSerializer.java
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/context/effects/JavascriptContext.java
        Hide
        Deryk Sinotte added a comment -

        The ice-extras.js file is now written out for all portlets all the time. It does not completely solve this problem but behaviour is better.

        1. The modal popup does not appear as the topmost window - FIXED
        2. The modal popup does not grey-out the rendered browser page under it - FIXED
        3. The modal popup window does not take control over the entire browser window - FIXED
        4. The draggable panel renders but is not draggable - FIXED
        5. The "Close" button on the draggable panel does not close the draggable panel - NOT FIXED

        In addition, having multiple instances of the popup panel seems to adversely effect the behaviour so perhaps multiple copies of the ice-extras.js file do not play well together. Further investigation is required.

        Show
        Deryk Sinotte added a comment - The ice-extras.js file is now written out for all portlets all the time. It does not completely solve this problem but behaviour is better. 1. The modal popup does not appear as the topmost window - FIXED 2. The modal popup does not grey-out the rendered browser page under it - FIXED 3. The modal popup window does not take control over the entire browser window - FIXED 4. The draggable panel renders but is not draggable - FIXED 5. The "Close" button on the draggable panel does not close the draggable panel - NOT FIXED In addition, having multiple instances of the popup panel seems to adversely effect the behaviour so perhaps multiple copies of the ice-extras.js file do not play well together. Further investigation is required.
        Hide
        Deryk Sinotte added a comment -

        Revising the subject line to be more generic.

        So although it's not completely fixed, a couple of new issues have cropped up.

        1) The modal dialog is completely disabled in IE.
        2) Adding another portlet to the page causes popups to stop working properly.

        Show
        Deryk Sinotte added a comment - Revising the subject line to be more generic. So although it's not completely fixed, a couple of new issues have cropped up. 1) The modal dialog is completely disabled in IE. 2) Adding another portlet to the page causes popups to stop working properly.
        Deryk Sinotte made changes -
        Summary ice:panelPopup component showcase example doesn't work as a portlet under Liferay ice:panelPopup component doesn't work as a portlet under Liferay
        Hide
        Neil Griffin added a comment -

        FYI, a Liferay customer just wrote the following regarding a sample portlet I provided him that attempts to demonstrate the modal popup feature:

        Thanks for the demo!

        The dialog indeed is displayed but can't be closed and is not modal for me... So evidently it needs some work, hopefully ICEFaces team will figure it out... But it is a great start...

        --Neil

        Show
        Neil Griffin added a comment - FYI, a Liferay customer just wrote the following regarding a sample portlet I provided him that attempts to demonstrate the modal popup feature: Thanks for the demo! The dialog indeed is displayed but can't be closed and is not modal for me... So evidently it needs some work, hopefully ICEFaces team will figure it out... But it is a great start... --Neil
        Ken Fyten made changes -
        Fix Version/s 1.7 [ 10080 ]
        Hide
        Deryk Sinotte added a comment -

        I simplified the test case further and started with the non-modal popup. It seems that the culprit for the Close button not working on the draggable is the type="button" attribute. Removing this seems to make the "Close" button work again. In checking the 1.5.3 release, that attribute is in the component-showcase example for popups but has since been removed. The spec for command button says that the only valid values are "submit" (the default) and "reset". In any event, the draggable popup seems to work as advertised in the test portlet when the suggested changes is made.

        The modal dialog code didn't have the type attributes set for the close button so didn't show the issue. I tried putting two instances of the test portlet on the same page and, once the above changes was made, both types of popup panels appeared to work as per the component showcase example. There may still be some work around how popups should be "owned" by the portlet that spawns them (e.g. should a modal popup be modal for the whole page or should it just be model for the parent portlet) but that discussion should probably be done elsewhere. At this point, it appears that popups generally work in Liferay.

        Show
        Deryk Sinotte added a comment - I simplified the test case further and started with the non-modal popup. It seems that the culprit for the Close button not working on the draggable is the type="button" attribute. Removing this seems to make the "Close" button work again. In checking the 1.5.3 release, that attribute is in the component-showcase example for popups but has since been removed. The spec for command button says that the only valid values are "submit" (the default) and "reset". In any event, the draggable popup seems to work as advertised in the test portlet when the suggested changes is made. The modal dialog code didn't have the type attributes set for the close button so didn't show the issue. I tried putting two instances of the test portlet on the same page and, once the above changes was made, both types of popup panels appeared to work as per the component showcase example. There may still be some work around how popups should be "owned" by the portlet that spawns them (e.g. should a modal popup be modal for the whole page or should it just be model for the parent portlet) but that discussion should probably be done elsewhere. At this point, it appears that popups generally work in Liferay.
        Hide
        Deryk Sinotte added a comment -

        Marking as FIXED for 1.7 DR#1

        Show
        Deryk Sinotte added a comment - Marking as FIXED for 1.7 DR#1
        Deryk Sinotte made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Fix Version/s 1.7DR#1 [ 10100 ]
        Fix Version/s 1.7 [ 10080 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Fix Version/s 1.7 [ 10080 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Deryk Sinotte [ deryk.sinotte ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Neil Griffin
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: