ICEfaces
  1. ICEfaces
  2. ICE-1672

JSF navigation rules are not informing the portal of a change in portlet modes

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6DR#5
    • Fix Version/s: 2.0.1
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      Win XP / JDK 1.4 / Tomcat 5.5.17 / Liferay 4.3.0-RC1
    • Workaround Exists:
      Yes
    • Workaround Description:
      Use the portlet window widgets for navigation between nodes.

      Description

      I think this is a by-product of abandoning the JSF-Portlet Bridge -- specifically the Sun JSF-Portlet Bridge, as the Apache bridge has the same bug that I am documenting here.

      JSF Portlets often have "EDIT" mode, which enables the user to edit javax.portlet.PortletPreferences, enabling users to customize portlets in various ways. The portal has decorations/icons that let you invoke EDIT mode and HELP mode, and then typically provides a "BACK" type of decoration/icon that re-invokes the "VIEW" mode.

      However, a typical scenario for EDIT mode is that JSF portlet developers simply want to present the user with an <ice:form> and a bunch of fields for editing preferences. Then, the user clicks a "Submit" button.

      Using JSF Navigation rules, it's easy to force the JSF portlet to switch back from EDIT to VIEW mode when the Submit button is clicked. However, when this is done with ICEfaces, the portal is not notified of the mode change, and the decorations remain stuck in EDIT mode.

      I just attached an enhanced version of the sample portlet released with Liferay 4.3.0-RC1, which has been modified to reproduce this problem.

      To reproduce:

      To reproduce:

      - Download Liferay 4.3.0-RC1 from here and install:
      http://www.liferay.com/web/guest/downloads/liferay_enterprise_portal/4_3_0rc1

      - Copy the attached portlet .WAR into $HOME/liferay/deploy (hot deploy folder):

      - Start the portal

      - Start Browser and visit http://localhost:8080 and login as test@liferay.com with password test

      - Add a new portal page named "ICEfaces"

      - Add the Sample ICEfaces (Sun RI) Portlet from the "Add Content" option

      - After the portlet appears, click on the pencil+paper icon to invoke EDIT mode

      - Type in any value for the email address field

      - Click Submit

      Now... clicking the submit button triggers the following navigation-rule in faces-config.xml:

      <navigation-rule>
      <from-view-id>/Edit.iface</from-view-id>
      <navigation-case>
      <to-view-id>/JobApplication.iface</to-view-id>
      </navigation-case>
      </navigation-rule>

      And indeed, the portlet shows the JobApplication.iface view after the click, but the portlet is not informed that we are back in VIEW mode, and the portlet decorations/icons continue to display "<< Back" instead of the full set of decorations for Config, Edit, Help, etc..


      --Neil

        Issue Links

          Activity

          Neil Griffin created issue -
          Hide
          Neil Griffin added a comment -

          This is an enhanced version of the sample portlet released with Liferay 4.3.0-RC1, which has been modified to reproduce this problem.

          Show
          Neil Griffin added a comment - This is an enhanced version of the sample portlet released with Liferay 4.3.0-RC1, which has been modified to reproduce this problem.
          Neil Griffin made changes -
          Field Original Value New Value
          Attachment sample-icefaces-sun-portlet.war [ 10454 ]
          Ken Fyten made changes -
          Fix Version/s 1.7 [ 10080 ]
          Assignee User Deryk.sinotte [ deryk.sinotte ]
          Ken Fyten made changes -
          Fix Version/s 1.7DR#1 [ 10100 ]
          Fix Version/s 1.7 [ 10080 ]
          Hide
          Deryk Sinotte added a comment -

          To change the mode of the portlet programmatically, you need to access an ActionRequest/ActionResponse. Currently, with ICEfaces, we don't support this code path as we handle all of the "actionable" requests via Ajax and bypass the usually portal mechanisms unless a new view is required. For the time being, we suggest that all mode changes are done by using the window widgets and not via JSF navigation. The navigation can be used to change views within a given mode (multiple pages within VIEW mode or multiple pages within EDIT mode) but to actually switch modes (from VIEW to EDIT or back) then we recommend you rely solely on the window widgets for the time being. We're continuing to look at ways to support proper mode changes from within JSF navigation.

          Show
          Deryk Sinotte added a comment - To change the mode of the portlet programmatically, you need to access an ActionRequest/ActionResponse. Currently, with ICEfaces, we don't support this code path as we handle all of the "actionable" requests via Ajax and bypass the usually portal mechanisms unless a new view is required. For the time being, we suggest that all mode changes are done by using the window widgets and not via JSF navigation. The navigation can be used to change views within a given mode (multiple pages within VIEW mode or multiple pages within EDIT mode) but to actually switch modes (from VIEW to EDIT or back) then we recommend you rely solely on the window widgets for the time being. We're continuing to look at ways to support proper mode changes from within JSF navigation.
          Deryk Sinotte made changes -
          Workaround Description Use the portlet window widgets for navigation between nodes.
          Workaround Exists [Yes]
          Ken Fyten made changes -
          Fix Version/s 1.7 [ 10080 ]
          Fix Version/s 1.7DR#1 [ 10100 ]
          Hide
          Deryk Sinotte added a comment -

          Need to support doing our Ajax communication through the portal container.

          Show
          Deryk Sinotte added a comment - Need to support doing our Ajax communication through the portal container.
          Deryk Sinotte made changes -
          Link This issue depends on ICE-2520 [ ICE-2520 ]
          Ken Fyten made changes -
          Fix Version/s 1.7 [ 10080 ]
          Assignee Deryk Sinotte [ deryk.sinotte ]
          Hide
          Deryk Sinotte added a comment -

          We'll looking at doing this for ICEfaces 2.0 when we can adapt to support the Portlet 2.0 spec (JSR 286).

          Show
          Deryk Sinotte added a comment - We'll looking at doing this for ICEfaces 2.0 when we can adapt to support the Portlet 2.0 spec (JSR 286).
          Deryk Sinotte made changes -
          Fix Version/s 2.0 [ 10032 ]
          Assignee Deryk Sinotte [ deryk.sinotte ]
          Hide
          Deryk Sinotte added a comment -

          General and proper portlet support for ICEfaces 2.0 falls under the parent issue of the JSF Portlet Bridge.

          Show
          Deryk Sinotte added a comment - General and proper portlet support for ICEfaces 2.0 falls under the parent issue of the JSF Portlet Bridge.
          Deryk Sinotte made changes -
          Link This issue depends on ICE-3420 [ ICE-3420 ]
          Deryk Sinotte made changes -
          Assignee Deryk Sinotte [ deryk.sinotte ]
          Hide
          Ken Fyten added a comment -

          Neil, can you update the JIRA based on the outlook for this when using IF 2.0 and PortletFacesBridge?

          Show
          Ken Fyten added a comment - Neil, can you update the JIRA based on the outlook for this when using IF 2.0 and PortletFacesBridge?
          Ken Fyten made changes -
          Salesforce Case []
          Fix Version/s 2.0-Beta [ 10231 ]
          Fix Version/s 2.0-Alpha3 [ 10032 ]
          Assignee Neil Griffin [ ngriffin7a ]
          Ken Fyten made changes -
          Fix Version/s 2.0-Beta2 [ 10242 ]
          Fix Version/s 2.0-Beta1 [ 10231 ]
          Hide
          Deryk Sinotte added a comment -

          Re-targetting for ICEfaces 2.0 final release as the feature is in development and not yet ready for the Beta 2 release.

          Show
          Deryk Sinotte added a comment - Re-targetting for ICEfaces 2.0 final release as the feature is in development and not yet ready for the Beta 2 release.
          Deryk Sinotte made changes -
          Salesforce Case []
          Fix Version/s 2.0.0 [ 10230 ]
          Fix Version/s 2.0-Beta2 [ 10242 ]
          Ken Fyten made changes -
          Salesforce Case []
          Fix Version/s 2.0.0-EE-Beta1 [ 10250 ]
          Fix Version/s 2.0.0 [ 10230 ]
          Ken Fyten made changes -
          Fix Version/s 2.0.0-EE-GA [ 10263 ]
          Fix Version/s 2.0.0-EE-Beta1 [ 10250 ]
          Hide
          Neil Griffin added a comment -

          This feature has been implemented in the PortletFaces Bridge, and will appear in the v2.0.0 production release of the bridge.
          http://jira.portletfaces.org/browse/BRIDGE-114

          Show
          Neil Griffin added a comment - This feature has been implemented in the PortletFaces Bridge, and will appear in the v2.0.0 production release of the bridge. http://jira.portletfaces.org/browse/BRIDGE-114
          Neil Griffin made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 2.0.1 [ 10255 ]
          Resolution Fixed [ 1 ]
          Ken Fyten made changes -
          Fix Version/s 2.0.0-EE-GA [ 10263 ]
          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Neil Griffin
              Reporter:
              Neil Griffin
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: