You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by ZC...@tsys.com on 2004/04/28 19:33:28 UTC

Nested tag: Best Practices?

What is the best practices approach with struts tags when using nested 
tags within a JSP? For example, if I have a nested form & root defined, 
should all the tags used within the nested form use the nested equivalent 
of the html tag? In this simplified example, should I use nested or html 
for the image tag and submit button? I noticed there isn't a nested 
equivalent to the reset button.

<nested:form  method="post" action="/myAction.do">
        <nested:root name="myForm">

        <html:img src="myImg" altKey="myImage" />
        <nested:select property="select"> 
                <nested:option value="1"><bean:message key="name1" /></nested:option>
                <nested:option value="2"><bean:message key="name2" /></nested:option>
        </nested:select>

        <nested:submit property="submit"><bean:message key="mySubmit" /></nested:submit>
        <html:reset><bean:message key="myReset" /></html:submit>

        </nested:root>
</nested:form>

Thanks!

Zach Curtis
TSYS Technology Center
ZCurtis@tsys.com
208-424-2145


-----------------------------------------
The information contained in this communication (including any attachments hereto) is confidential and is intended solely for the personal and confidential use of the individual or entity to whom it is addressed.  The information may also constitute a legally privileged confidential communication.  If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this communication in error and that any review, dissemination, copying, or unauthorized use of this information, or the taking of any action in reliance on the contents of this information is strictly prohibited.  If you have received this communication in error, please notify us immediately by e-mail, and delete the original message.  Thank you