You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Anand M S <an...@hotmail.com> on 2003/05/27 22:22:41 UTC

what the wrong withis?

waht the wrong with following code, it doesn't work.
can't we use <bean:write> inside any other struts tag?

<html:select property="fosCode" value="<bean:write name="header" 
property="gender"/>"
<html:options collection="FIELD_OF_STUDY_CODES" property="code" 
labelProperty="description" />
</html:select>

_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE* 
http://join.msn.com/?page=features/virus


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: what the wrong withis?

Posted by James Mitchell <jm...@apache.org>.
#1 - You didn't close your nested tag properly.
#2 - Second, you can't nest tags.


Try this instead:

<bean:define id="gender">
  <bean:write name="header" property="gender"/>
</bean:define>

<html:select property="fosCode" value="<%=gender%>"
<html:options 
     collection="FIELD_OF_STUDY_CODES" 
       property="code" 
  labelProperty="description" />
</html:select>



--
James Mitchell
Software Developer/Struts Evangelist
http://www.struts-atlanta.org



----- Original Message ----- 
From: "Anand M S" <an...@hotmail.com>
To: <st...@jakarta.apache.org>
Sent: Tuesday, May 27, 2003 4:22 PM
Subject: what the wrong withis?


> waht the wrong with following code, it doesn't work.
> can't we use <bean:write> inside any other struts tag?
> 
> <html:select property="fosCode" value="<bean:write name="header" 
> property="gender"/>"
> <html:options collection="FIELD_OF_STUDY_CODES" property="code" 
> labelProperty="description" />
> </html:select>
> 
> _________________________________________________________________
> MSN 8 with e-mail virus protection service: 2 months FREE* 
> http://join.msn.com/?page=features/virus
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org