struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Taylor" <rtay...@mulework.com>
Subject RE: Using Struts HTML tags
Date Fri, 27 Aug 2004 13:36:48 GMT
Just a note:
You cannot embed tags within another tag's attribute; ie,

<html:radio property="id" value="<bean:write name="user" property="fromDomain"/>"/>

is not allowed.

You could use JSTL and do something like

<html:radio property="id" value="${user.fromDomain}"/>

I think your container has to be JSP2.0 compliant; if not
then you could use the Struts-EL library.

robert

> -----Original Message-----
> From: Varley, Roger [mailto:Roger.Varley@atosorigin.com]
> Sent: Friday, August 27, 2004 8:59 AM
> To: user@struts.apache.org
> Subject: Using Struts HTML tags
> 
> 
> Hi
> 
> I'm trying to use the <html:radio> tag. What I'm trying to do is to ensure that
the selected radio button is returned in 
> the ActionFormBean for this page and the value that is returned is contained in a session
bean "user" property 
> "fromDomain". What I want to see in the generated HTML is <input type="radio" name="id"
value="myDomain"/> where myDomain 
> is the value of bean user.getFromDomain().
> 
> I've tried <html:radio property="id" value="<bean:write name="user" property="fromDomain"/>"/>
which fails to compile, 
> whilst escaping the double quotes <html:radio property="id" value="<bean:write
name=\"user\" property=\"fromDomain\"/> 
> writes the string "<bean:write name="user" property="fromDomain"/>" into the value
attribute of the html.
> 
> Can I actually do what I want to do?
> 
> Regards
> Roger
> 
> 
> __________________________________________________________________________
> This e-mail and the documents attached are confidential and intended 
> solely for the addressee; it may also be privileged. If you receive this 
> e-mail in error, please notify the sender immediately and destroy it.
> As its integrity cannot be secured on the Internet, the Atos Origin group 
> liability cannot be triggered for the message content. Although the 
> sender endeavours to maintain a computer virus-free network, the sender 
> does not warrant that this transmission is virus-free and will not be 
> liable for any damages resulting from any virus transmitted.
> __________________________________________________________________________
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 

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


Mime
View raw message