There's no problem with the JavaScript - I'm wrapping bean getters in both
String() and parseFloat() without a problem.  I don't think the
<html:select> will compile without the property="[string]" with the quotes.
I don't have the time to mess with it, so I thought I'd just share an idea.

Or he could just use Flash....

Mark

-----Original Message-----
From: James Mitchell [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 14, 2002 4:23 PM

Does this compile?

JM

> -----Original Message-----
> From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 14, 2002 4:14 PM
> To: 'Struts Users Mailing List'
> Subject: RE: How-to dynamically name properties?
>
>
> I've found using <bean:write> as part of dynamic functions
> problematic, but
> have been able to do with JavaScript by wrapping the bean getter with a
> JavaScript "type."  For example, you may find some way to do
> something like:
>
> <script type="text/javascript">
>   function getProperty() {
>     var newProp ="x_" + String( <bean:write name="y" property="z"
> filter="true"/>);
>     return newProp;
>   }
> </script>
>
> <html:select property=javascript:getProperty()>
>
> But I think Struts will choke when it doesn't see a double quote after the
> assignment operator in the select tag.
>
> Mark
>
> -----Original Message-----
> From: Michael Marrotte [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 14, 2002 3:59 PM
> To: [EMAIL PROTECTED]
> Subject: How-to dynamically name properties?
>
>
> Can someone help me figure a way to do something like this?
>
> <html:select property="x_<bean:write name="y" property="z"
> filter="true"/>">
>
> What I wanted to do is dynamically name the <html:select> property,
> x_[some-dynamic-value].
>
> Any idea on how I should really approach this?
>
> Thanks,
>
> --Michael Marrotte
>
>
> --
> 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