Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-4590

Allow to use multiple names in result

    XMLWordPrintableJSON

Details

    Description

      Allow to use multiple values in result tag name attribute and in Result annotation name.

      So this typical configuration:

      <action name="save">
          <result>success.jsp</result>
          <result name="error">input-form.jsp</result>
          <result name="input">input-form.jsp</result>
      </action>
      

      Can be shorten to that:

      <action name="save">
          <result>success.jsp</result>
          <result name="error, input">input-form.jsp</result>
      </action>
      

      And this annotations:

      @Action(results = {
          @Result(name="error", location="input-form.jsp"),
          @Result(name="input", location="input-form.jsp"),
          @Result(name="success", location="success.jsp")
      })
      

      To that:

      @Action(results = {
          @Result(name="error, input", location="input-form.jsp"),
          @Result(name="success", location="success.jsp")
      })
      

      Attachments

        Activity

          People

            aleksandr-m Aleksandr Mashchenko
            aleksandr-m Aleksandr Mashchenko
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: