Thank you, Sami.  That helps a lot.

Jane

-----Original Message-----
From: Sami Dalouche [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 09, 2007 1:55 PM
To: Struts Users Mailing List
Subject: RE: Struts 2 Themes

Hi,

your best bet is to look at S2's source code. You can start by looking
at org.apache.struts2.views.freemarker.tags.StrutsModels.
Each of the tags have an associated "Model", and S2 taglib's models are
registered in this class.

So, for instance, if you look for TextField's template name :
1] There is a "TextFieldModel" instance declared
2] So, you look at
org.apache.struts2.views.freemarker.tags.TextFieldModel#getBean() :
3] You can see "return new TextField(stack, req, res);"
4] So, you look at org.apache.struts2.components.TextField
5] You can see : final public static String TEMPLATE = "text";

=> So, the template name is "text" ;)

Regards,
Sami Dalouche



Le mardi 09 octobre 2007 à 13:07 -0400, Jiang, Jane (NIH/NCI) [C] a
écrit :
> Sorry, my fault.  I did not notice the code I used to test checkbox
> defined the theme inside the tag.  So checkbox.ftl is the template for
> s:checkbox.  I would still like to find out if there is a general rule
> for map the tag to template and other resource to learn about theme.
> 
> -----Original Message-----
> From: Jiang, Jane (NIH/NCI) [C] 
> Sent: Tuesday, October 09, 2007 12:57 PM
> To: Struts Users Mailing List
> Subject: Struts 2 Themes
> 
> I am trying to get a better understanding of S2 themes.  I read the
> document and the create themes page in the cookbook.  
> 
> My question is how I can find the right template file for a tag.  I
> tried to change text.ftl and found that ties to s:textfield.  I am now
> trying to figure out what is the one for checkbox.  I thought it would
> be the checkbox.ftl.  But s:chechbox does not change at all when I
> changed the checkbox.ftl.  What about s:property? 
> 
> Where can I find more information if I want to get more into the themes?
> 
> Thanks a lot for your help,
> 
> Jane
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to