You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Charlesworth, Chico" <Ch...@softwareag.co.uk> on 2001/06/06 10:08:38 UTC

a struts tag within another struts tag ...

does anyone know a way of doing something like so, so that it works:

<logic:iterate id="listElement" name="myList">
	<html:radio property="selectedListElement" value="<bean:write
name="listElement"/>"/>
</logic:iterate>

i always get a error saying that listElement has no value in that scope ...

i get around this problem using jsp, like so:

<logic:iterate id="listElement" name="myList">
<% String myListElement = (String)
pageContext.findAttribute("listElement");%>
	<html:radio property="selectedListElement"
value="<%=myListElement%>"/>
</logic:iterate>

But I really don't want to be mixing jsp with struts ...

any ideas?

chico

-- 
The content of this e-mail is confidential, may contain privileged material
and is intended solely for the recipient(s) named above. If you receive this
in error, please notify Software AG immediately and delete this e-mail.

Software AG (UK) Limited
Registered in England & Wales 1310740
Registered Office: Hudson House, Hudson Way,
Pride Park, Derby DE24 8HS

Re: a struts tag within another struts tag ...

Posted by Oleg V Alexeev <go...@penza.net>.
Hello Chico,

Wednesday, June 06, 2001, 12:08:38 PM, you wrote:


CC> does anyone know a way of doing something like so, so that it works:

CC> <logic:iterate id="listElement" name="myList">
CC>         <html:radio property="selectedListElement" value="<bean:write
name="listElement"/>>"/>
CC> </logic:iterate>

You can not use one tag in attribute value of another tag for jsp tag
libraries. Another words - if you use one tag then you can place to
the attributes as values only strings or run-time expressions like
<%= %> for attributes marked as <rtexprvalue>true</rtexprvalue>

CC> i always get a error saying that listElement has no value in that scope ...

CC> i get around this problem using jsp, like so:

CC> <logic:iterate id="listElement" name="myList">
CC> <% String myListElement = (String)
CC> pageContext.findAttribute("listElement");%>
CC>         <html:radio property="selectedListElement"
CC> value="<%=myListElement%>"/>
CC> </logic:iterate>

CC> But I really don't want to be mixing jsp with struts ...

CC> any ideas?

CC> chico




-- 
Best regards,
 Oleg                            mailto:gonza@penza.net