You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by ets04uga <et...@yahoo.com> on 2009/06/19 17:06:44 UTC
Struts2 s:textfield to formatted html
In looking at the code for the s:textfield tag and it uses the
template/simple/text.ftl file as the template. The text.ftl file starts
with the html input tag and I'm not understanding where the label, td and tr
tags come from such that
<s:textfield key="user.firstname" name="firstName" />
becomes
<tr>
<td class="tdLabel">
<label for="updateUser_firstName" class="errorLabel">First
Name:</label>
</td>
<td>
<input type="text" name="firstName" value=""
id="updateUser_firstName"/>
</td>
</tr>
Can someone provide a general overview to get me going?
Thanks for any guidance,
E
--
View this message in context: http://www.nabble.com/Struts2-s%3Atextfield-to-formatted-html-tp24113259p24113259.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Struts2 s:textfield to formatted html
Posted by Girish Naik <gi...@gmail.com>.
May be you should have a look at the different themes available in struts.
Using a simple theme will not generate such unwanted tags.
For getting a simple theme you need to put the following parameter in
web.xml:
<context-param>
<param-name>csstheme</param-name>
<param-value>simplicity</param-value>
</context-param>
Regards,
---------------------------------------------------------
Girish Naik
Mobile:-+91-09740091638
girish.naik@gmail.com
P. J. O'Rourke<http://www.brainyquote.com/quotes/authors/p/p_j_orourke.html>
- "If government were a product, selling it would be illegal."
On Fri, Jun 19, 2009 at 8:36 PM, ets04uga <et...@yahoo.com> wrote:
>
> In looking at the code for the s:textfield tag and it uses the
> template/simple/text.ftl file as the template. The text.ftl file starts
> with the html input tag and I'm not understanding where the label, td and
> tr
> tags come from such that
>
> <s:textfield key="user.firstname" name="firstName" />
>
> becomes
>
> <tr>
> <td class="tdLabel">
> <label for="updateUser_firstName" class="errorLabel">First
> Name:</label>
> </td>
> <td>
> <input type="text" name="firstName" value=""
> id="updateUser_firstName"/>
> </td>
> </tr>
>
>
> Can someone provide a general overview to get me going?
>
> Thanks for any guidance,
> E
> --
> View this message in context:
> http://www.nabble.com/Struts2-s%3Atextfield-to-formatted-html-tp24113259p24113259.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
Re: Struts2 s:textfield to formatted html
Posted by ets04uga <et...@yahoo.com>.
So yes, the label piece I was looking for was farther down the pipeline in
xhtml/controlheader-core.ftl
-E
--
View this message in context: http://www.nabble.com/Struts2-s%3Atextfield-to-formatted-html-tp24113259p24118045.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Struts2 s:textfield to formatted html
Posted by Dave Newton <ne...@yahoo.com>.
ets04uga wrote:
> In looking at the code for the s:textfield tag and it uses the
> template/simple/text.ftl file as the template. The text.ftl file starts
> with the html input tag and I'm not understanding where the label, td and tr
> tags come from such that
>
> <s:textfield key="user.firstname" name="firstName" />
>
> becomes
>
> <tr>
> <td class="tdLabel">
> <label for="updateUser_firstName" class="errorLabel">First
> Name:</label>
> </td>
> <td>
> <input type="text" name="firstName" value=""
> id="updateUser_firstName"/>
> </td>
> </tr>
>
> Can someone provide a general overview to get me going?
Follow the yellow brick road... there are several other files included
by the tags via the #include directive. The default theme is
"xhtml"--unless you're using the "simple" theme you need to start
looking in the theme you're actually using.
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org