struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Husted <hus...@apache.org>
Subject Re: Confused - Scaffold and Action Mapping
Date Thu, 18 Sep 2003 10:49:06 GMT
1. The .article.Menu tile uses the menuForm bean.

2. Check the import statement at the top of the file =:0) It's just a 
static String.

HTH, Ted.

Caroline Jen wrote:
> I have problem to understand the action mapping shown
> below:
> 
> code:
> -----------------------------------------------------
> 
> <action path="/Menu" name="menuForm"      
> type="org.apache.struts.scaffold.ExistsAttributeAction"
>       parameter="application;HOURS"> 
> <forward name="success" path=".article.Menu"/>
> <forward name="failure" path="/do/MenuCreate"/>
> </action> 
> 
> -----------------------------------------------------
> 
> It looks to me that 
> 
> 1. menuForm is the logical name for the form bean as 
>    given in the form-bean segment of the 
>    struts-config.xml file.  
> 
> Question 1: What is the rational of having 'menuForm'
> in the org.apache.struts.scaffold folder in
> ActionMapping? 
> 
> 2. the action that is going to be executed is 
>    the ExistsAttributeAction in the 
>    org.apache.struts.scaffold folder.  If the 
>    condition returned in that action is 'success', the
> 
>    article.Menu tile will render the next page. 
> 
>    The code of ExistsAttributeAction.java shows:
> 
>    mapping.findForward(Tokens.SUCCESS);
> 
> Question 2: Where can I find Tokens.SUCCESS maps to
> 'success'?
> 
> Thank you for your help.
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 
> 

-- 
Ted Husted,
   Junit in Action  - <http://www.manning.com/massol/>,
   Struts in Action - <http://husted.com/struts/book.html>,
   JSP Site Design  - <http://www.amazon.com/exec/obidos/ISBN=1861005512>.



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


Mime
View raw message