Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-1653 Can't specify method to call on action in portlet mode
  3. WW-1713

Using 'url' tag library element with Action & Method doens't work.

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.4
    • 2.0.10, 2.1.0
    • Plugin - Portlet
    • None
    • Liferay 4.1.2, Fedora Core 4

    • Important

    Description

      It appears as though "specifying a method on a submit button" does now work.

      But, specifying a method for an action on a link does not work.

      <a href="<s:url action="ActionName" method="myMethod"/>">Click Me</a>

      We are using liferay 4.1.2. Upon page creation, the url looks something like this.

      http://database:8080/c/portal/layout?p_l_id=PRI.15.2&p_p_id=SampleStruts2Portlet_WAR_samplestruts2portlet&p_p_action=0&p_p_state=normal&p_p_mode=view&p_p_col_id=&p_p_col_pos=0&p_p_col_count=0&_SampleStruts2Portlet_WAR_samplestruts2portlet_struts.portlet.mode=view&_SampleStruts2Portlet_WAR_samplestruts2portlet_struts.portlet.action=%2Fview%2FActionName

      The parameter '_SampleStruts2Portlet_WAR_samplestruts2portlet_struts.portlet.action'=%2Fview%2FActionName and this link will not call the myMethod method, it will instead call the exectue method of ActionName, however if we change the url manually to

      http://database:8080/c/portal/layout?p_l_id=PRI.15.2&p_p_id=SampleStruts2Portlet_WAR_samplestruts2portlet&p_p_action=0&p_p_state=normal&p_p_mode=view&p_p_col_id=&p_p_col_pos=0&p_p_col_count=0&_SampleStruts2Portlet_WAR_samplestruts2portlet_struts.portlet.mode=view&_SampleStruts2Portlet_WAR_samplestruts2portlet_struts.portlet.action=%2Fview%2FActionName!myMethod, it will call the myMethod method.

      Attachments

        Issue Links

          Activity

            People

              nilsga Nils-Helge Garli
              flabre Brent Flaten
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: