add action attribute and fix template bug
-----------------------------------------

         Key: XDP-152
         URL: http://jira.codehaus.org/browse/XDP-152
     Project: XDoclet 2 Plugins
        Type: Improvement

 Environment: WinXP
    Reporter: Yosimasu Lin
 Attachments: ActionMappings.jelly.patch, StrutsActionTag.java.patch

1. There is a bug when I use plugin-struts in following condition:

/**
 [EMAIL PROTECTED] path="/form" parameter="form" name="paymentForm" 
attribute="form" validate="false" scope="session"
 * @struts.action-forward name="form01" path="cycu2400h_01.cycu_01.form.01"
 * @struts.action-forward name="select" path="/select.jspa" redirect="true"
 * @struts.action-forward name="confirm" path="/confirm.jspa" redirect="true"
 * 
 * @struts.action path="/confirm" parameter="confirm" name="paymentForm" 
attribute="form" validate="false" scope="session"
 * @struts.action-forward name="form01" path="cycu2400h_01.cycu_01.confirm.01"
 * @struts.action-forward name="select" path="/select.jspa" redirect="true"
 * @struts.action-forward name="confirm" path="/finish.jspa" redirect="true"
 */

aboved will generate:

<action name="paymentForm" attribute="form" 
type="cycu2400h_01.cycu_01.web.MaintainAction" validate="false" 
parameter="form" scope="session" path="/form">
      <forward name="form01" path="cycu2400h_01.cycu_01.form.01"/>
      <forward name="select" path="/select.jspa" redirect="true"/>
      <forward name="confirm" path="/confirm.jspa" redirect="true"/>
      <forward name="form01" path="cycu2400h_01.cycu_01.confirm.01"/>
      <forward name="select" path="/select.jspa" redirect="true"/>
      <forward name="confirm" path="/finish.jspa" redirect="true"/>
    </action>
    <action name="paymentForm" attribute="form" 
type="cycu2400h_01.cycu_01.web.MaintainAction" validate="false" 
parameter="confirm" scope="session" path="/confirm">
      <forward name="form01" path="cycu2400h_01.cycu_01.form.01"/>
      <forward name="select" path="/select.jspa" redirect="true"/>
      <forward name="confirm" path="/confirm.jspa" redirect="true"/>
      <forward name="form01" path="cycu2400h_01.cycu_01.confirm.01"/>
      <forward name="select" path="/select.jspa" redirect="true"/>
      <forward name="confirm" path="/finish.jspa" redirect="true"/>
    </action>

Original template code uses Action's name to check the context is in the same 
action.
That is wroing!!!
Because the attribute presents a form name, not a action name.
I fix it to use action's path to check context.
That fits my requirement.

2. I add a qtag for StrutsActionTag called "attribute".
In struts-config DTD, attribute presents a scop attribute name of an action 
form.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
xdoclet-plugins-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xdoclet-plugins-interest

Reply via email to