You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Chris Evans <ch...@canlink.com> on 2001/02/09 14:53:27 UTC

struts tag inside a struts tag

Hi,

i'm trying to figure out a way to use a <bean:write> tag inside a <struts:checkbox> tag.  Is there a way???

This is what it should look like:

<jsp:useBean
    id="ViewOrderForm"
    scope="session"
    class="goes.somewhere.ViewOrderForm"
/>

<struts:form action="<%=request.getContextPath()+ \"/redirectAction.do\" %>"
          name="RedirectForm"
          type="goes.somewhere.RedirectForm" >
<struts:iterate id="element"
            name="ViewOrderForm"
            property="orderLI"
        >

    <struts:checkbox property="remove" value="<bean:write name="element" property="itemPK" />" />

</struts:iterate>


What it would do is submit the rendered value for the "remove" array of checkboxes so as to easily find and remove the correct item.

Any help is appreciated,


Chris Evans
Canlink Interactive Technologies

Re: struts tag inside a struts tag

Posted by Peter Alfors <pe...@irista.com>.
Sorry.... You cannot use a taglib for an attribute to another taglib.

Chris Evans wrote:

> Hi, i'm trying to figure out a way to use a <bean:write> tag inside a
> <struts:checkbox> tag.  Is there a way??? This is what it should look
> like: <jsp:useBean
>     id="ViewOrderForm"
>     scope="session"
>     class="goes.somewhere.ViewOrderForm"
> /> <struts:form action="<%=request.getContextPath()+
> \"/redirectAction.do\" %>"
>           name="RedirectForm"
>           type="goes.somewhere.RedirectForm" ><struts:iterate
> id="element"
>             name="ViewOrderForm"
>             property="orderLI"
>         >     <struts:checkbox property="remove" value="<bean:write
> name="element" property="itemPK" />" /> </struts:iterate>  What it
> would do is submit the rendered value for the "remove" array of
> checkboxes so as to easily find and remove the correct item. Any help
> is appreciated,  Chris EvansCanlink Interactive Technologies