Portals Bridges
  1. Portals Bridges
  2. PB-75

GroovyPortlet need to support Jetspeed's new feature, auto-dispatching for edit_defaults mode option.

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0.3
    • Fix Version/s: 1.0.4
    • Component/s: groovy
    • Labels:
      None
    • Environment:
      Jetspeed-2.1.3

      Description

      When Jetspeed 2's auto-dispatching for edit_defaults mode option is turned on, JS2 would try to invoke doEdit() method directly without invoking render() method.
      For this functionality, Jetspeed-2 tries to know if the portlet is extending GenericPortlet and if it has public doEdit() method. (See https://issues.apache.org/jira/browse/JS2-634 for details.)

      However GroovyPortlet does not extend GenericPortlet, differing from other bridges. So, this new feature would not work for Groovy portlets.
      Therefore, GroovyPortlet need to extend GenericPortlet and have public doEdit() method to support the new feature of JS2.

        Activity

        Hide
        Woonsan Ko added a comment -

        Fixed.

        So, now every bridge-based portlet can support edit_defaults mode if it support only edit mode.

        By the way, I'd like to mention about Spring Portlet MVC based portlet on Jetspeed-2.
        Because it does not support public doEdit() method, so we can do the following workaround:

        If a Spring Portlet MVC based portlet has the following portlet mode mappings:

        <bean id="portletModeHandlerMapping" class="org.springframework.web.portlet.handler.PortletModeHandlerMapping">
        <property name="portletModeMap">
        <map>
        <entry key="view"><ref bean="myPortletViewController"/></entry>
        <entry key="edit"><ref bean="myPortletEditController"/></entry>
        <entry key="help"><ref bean="myPortletHelpController"/></entry>
        </map>
        </property>
        </bean>

        If you want the portlet to support edit_defaults mode, then just add the following:

        <entry key="edit_defaults"><ref bean="myPortletEditController"/></entry>

        That is, just copy from "edit" mode configuration and rename the key with "edit_defaults".

        Show
        Woonsan Ko added a comment - Fixed. So, now every bridge-based portlet can support edit_defaults mode if it support only edit mode. By the way, I'd like to mention about Spring Portlet MVC based portlet on Jetspeed-2. Because it does not support public doEdit() method, so we can do the following workaround: If a Spring Portlet MVC based portlet has the following portlet mode mappings: <bean id="portletModeHandlerMapping" class="org.springframework.web.portlet.handler.PortletModeHandlerMapping"> <property name="portletModeMap"> <map> <entry key="view"><ref bean="myPortletViewController"/></entry> <entry key="edit"><ref bean="myPortletEditController"/></entry> <entry key="help"><ref bean="myPortletHelpController"/></entry> </map> </property> </bean> If you want the portlet to support edit_defaults mode, then just add the following: <entry key="edit_defaults"><ref bean="myPortletEditController"/></entry> That is, just copy from "edit" mode configuration and rename the key with "edit_defaults".

          People

          • Assignee:
            Woonsan Ko
            Reporter:
            Woonsan Ko
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development