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

          There are no subversion log entries for this issue yet.

            People

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

              Dates

              • Created:
                Updated:
                Resolved: