struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Galbreath, Mark" <Galbre...@tessco.com>
Subject RE: [Q] bean:define dynamically
Date Thu, 18 Apr 2002 10:34:55 GMT
The type should be the fully-qualified name of the actual List being used,
not the Java class.

Mark

-----Original Message-----
From: Nicolas De Loof [mailto:nicolas.deloof@cgey.com]
Sent: Thursday, April 18, 2002 3:10 AM

I don't know if it will help, but I had a problem with such syntax :

try
<bean:define
    id="entitybean"
    name="RegionForm"
    property="<%= \"regions[\" + elementNo + \"].region_ent\" %>"
    type="java.util.ArrayList"
    scope="session"/>

As property attribute is defined in TLD to be "rtexprvalue", it can be
computed by a scriptlet, but the "property" attribute declaration must be
XML compliant (so you must escape quotes).

> I wish to define a bean:id as
>   <bean:define id="entitybean"  name="RegionForm"
> property="regions["<%= elementNo%>"].region_ent"
> type="java.util.ArrayList" scope="session"/>
>
>
> I tried giving <%= elementNo%>
>                <bean:write....>
> but it didn't work.
>
> Is there a way to do this?
>
> FYI,
> where RegionForm has attribute
>
> java.util.ArrayList regions;
> String elementNo;  // get populated on selection
> default="0"
>
> regions is a list of class type Region.
>
> Region class has attribute
>     java.util.ArrayList region_ent;
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Tax Center - online filing with TurboTax
> http://taxes.yahoo.com/
>
> --
> To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:struts-user-help@jakarta.apache.org>


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

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


Mime
View raw message