You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by hu...@apache.org on 2004/01/16 05:55:00 UTC

cvs commit: jakarta-struts/web/examples/exercise logic-forward.jsp

husted      2004/01/15 20:55:00

  Modified:    doc/userGuide struts-logic.xml
               src/share/org/apache/struts/taglib/logic RedirectTag.java
               web/examples/WEB-INF/exercise struts-config.xml
               web/examples/exercise logic-forward.jsp
  Log:
  Resolve #26133 "<logic:redirect> tag lacks "action" attribute", suggested by (Firepica)
  
  Revision  Changes    Path
  1.19      +17 -0     jakarta-struts/doc/userGuide/struts-logic.xml
  
  Index: struts-logic.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/doc/userGuide/struts-logic.xml,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- struts-logic.xml	16 Jan 2004 04:12:06 -0000	1.18
  +++ struts-logic.xml	16 Jan 2004 04:55:00 -0000	1.19
  @@ -1573,6 +1573,23 @@
                   same query parameter name will be created.</p>
                   </info>
   
  +                    <attribute>
  +                      <name>action</name>
  +                      <required>false</required>
  +                      <rtexprvalue>true</rtexprvalue>
  +                      <info>
  +                          <p>Logical name of a global <code>Action</code> that
  +                          contains the actual content-relative URI of the destination
  +                          of this transfer.  This hyperlink may be dynamically
  +                          modified by the inclusion of query parameters, as described
  +                          in the tag description.  You <strong>must</strong> specify
  +                          exactly one of the <code>action</code> attribute, the
  +                          <code>forward</code> attribute, the
  +                          <code>href</code> attribute,
  +                          or the <code>page</code> attribute.</p>
  +                      </info>
  +                  </attribute>
  +
                   <attribute>
                     <name>anchor</name>
                     <required>false</required>
  
  
  
  1.22      +20 -5     jakarta-struts/src/share/org/apache/struts/taglib/logic/RedirectTag.java
  
  Index: RedirectTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/logic/RedirectTag.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- RedirectTag.java	10 Jan 2004 21:03:32 -0000	1.21
  +++ RedirectTag.java	16 Jan 2004 04:55:00 -0000	1.22
  @@ -155,6 +155,20 @@
       }
   
       /**
  +     * The module-relative action (beginning with a slash) which will be
  +     * called by this link
  +     */
  +    protected String action = null;
  +
  +    public String getAction() {
  +        return (this.action);
  +    }
  +
  +    public void setAction(String action) {
  +        this.action = action;
  +    }
  +
  +    /**
        * The single-parameter request parameter name to generate.
        */
       protected String paramId = null;
  @@ -311,7 +325,7 @@
                       forward,
                       href,
                       page,
  -                    null,
  +                    action,
                       params,
                       anchor,
                       true,
  @@ -356,6 +370,7 @@
           href = null;
           name = null;
           page = null;
  +        action = null;
           paramId = null;
           paramName = null;
           paramProperty = null;
  
  
  
  1.3       +1 -0      jakarta-struts/web/examples/WEB-INF/exercise/struts-config.xml
  
  Index: struts-config.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/web/examples/WEB-INF/exercise/struts-config.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- struts-config.xml	16 Jan 2004 03:51:31 -0000	1.2
  +++ struts-config.xml	16 Jan 2004 04:55:00 -0000	1.3
  @@ -38,6 +38,7 @@
       </action>
       <action path="/logic-forward" forward="/logic-forward.jsp" />
       <action path="/logic-forward-test-forward" forward="/logic-forward-test-forward.jsp" />
  +    <action path="/logic-redirect-test-action" forward="/logic-redirect-test-action.jsp" />
       <action path="/logic-redirect-test-forward" forward="/logic-redirect-test-forward.jsp" />
       <action path="/logic-redirect-test-page" forward="/logic-redirect-test-page.jsp" />
   
  
  
  
  1.2       +1 -1      jakarta-struts/web/examples/exercise/logic-forward.jsp
  
  Index: logic-forward.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/web/examples/exercise/logic-forward.jsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- logic-forward.jsp	16 Jan 2004 03:52:15 -0000	1.1
  +++ logic-forward.jsp	16 Jan 2004 04:55:00 -0000	1.2
  @@ -11,9 +11,9 @@
       <ul>
       <li><a href="logic-forward.do?value=test">Standard hyperlink back to this page</a></li>
       <li><html:link action="/logic-forward-test-forward?value=test">Forward to this page</html:link></li>
  +    <li><html:link action="/logic-redirect-test-action?value=test">Redirect to this page, via action attribute</html:link></li>
       <li><html:link action="/logic-redirect-test-forward?value=test">Redirect to this page, via forward attribute</html:link></li>
       <li><html:link action="/logic-redirect-test-page?value=test">Redirect to this page, via page attribute</html:link></li>
  -    <li>Redirect to this page, via action attribute [:TODO:]</li>
       </ul>
       <hr />
       <ul>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org