I think you can. In the TLD you set rtexprvalue to true for that tag attribute and it 
should work.
--Kevin

-----Original Message-----
From: Ravi Kora [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 27, 2002 8:09 AM
To: 'Struts Users Mailing List'
Subject: RE: [Cust-Taglibs] How to mark a option using html:select?


I think you can't have a scriplet in a Struts tag as in the statement
<html:select ... value="<%=user.getCompany()%>"/>

However, if you have tried it and it worked, please mail me back
-Ravi


Thanks & Regards,
Ravi Kora
[EMAIL PROTECTED]
337-739-3434(M) 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]

Sent: Friday, September 27, 2002 7:54 AM
To: [EMAIL PROTECTED]
Subject: RE: [Cust-Taglibs] How to mark a option using html:select?


You cannot nest tags this way. You need to do something like:

<html:select ... value="<%=user.getCompany()%>"/>

or

<bean:define id="userCompany" name="user" property="company"/>
<html:select ... value="<%=userCompany.toString()%>"/>

- Thorsten

> -----Original Message-----
> From: Rademacher Tobias [mailto:[EMAIL PROTECTED]]
> Sent: 27 September 2002 11:55
> To: '[EMAIL PROTECTED]'
> Subject: [Cust-Taglibs] How to mark a option using html:select?
> 
> 
> I'm currently struggling with the fine custom taglibs of struts.
> 
> I have question about the selection tag. I'm currently using:
> 
>   <html:select property="role" 
>                style="margin-left:25%"
>     >
>       <html:options collection="roles" 
>                                   labelProperty="name" 
>                                   property="name"
>        />
>     </html:select>
> 
> Works fine. But anyway I want to get a specfic option marked,
> how do I do
> this?
> 
> The following code fails in Catalina 4.0.3
> 
>   <html:select property="role" 
>                style="margin-left:25%"
>                  value="<bean:write name="user" property="company"/>"
>     >
>       <html:options collection="roles" 
>                                   labelProperty="name" 
>                                   property="name"
>        />
>     </html:select>
> 
> What did I wrong? Assing fix string to value attrib works
> fine. But not a
> dynamically assinged value?
> How can I achive that?
> 
> Thx for any help.
> 
> Bye
> Toby
> 
> PS: What is the difference of html:options and
> html:optionsCollection? The
> docu of the last metioned tag  is fairly poor.
> 
> 
> --
> To unsubscribe, e-mail:   
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to