Subject: Re: [Q] bean:define dynamically
From: Vic Cekvenich <[EMAIL PROTECTED]>
 ===
You can submit on select, and populate the 2nd bean.
2nd option is to retrieve 3 colums in the 2nd select, and use javascript 
to filter.
Vic

Sanjay Choudhary wrote:

> is there an alternative for this??
> 
> As I said earlier that I have region list box which
> get populated by an arraylist of Region class. Region
> class contains array list of entity
> 
> Region    Entity
> 
> Based on what user selects in Region drop down box,
> Entity drop box will be populated.
> 
> I am sure people must have done this earlier.
> 
> Pls advice.
> 
> Sanjay
> --- [EMAIL PROTECTED] wrote:
> 
>>
>>
>>I believe that the issue here is that the
>>bean:define  needs to be able to
>>resolve the reference "regions["<%=
>>elementNo%>"].region_ent" at compile
>>time - not at run time.
>>
>>I belive it literally gets a copy of the bean
>>property that you are
>>specifying and creates a new bean from it that it
>>attaches to the page
>>contect. This means that you then reference the copy
>>of the Region in the
>>page context - not the offset into the array of
>>Regions in the initial
>>bean.
>>
>>Because of this behavior I believe it needs to be
>>able to resolve the
>>location of the object it's going to create the bean
>>from at compile time.
>>Not sure to be honest -
>>
>>Check the DefineTag source code to be sure.  It's in
>>the source tree at:
>>org\apache\struts\taglib\bean\DefineTag.java
>>
>>FWIW -
>>Kevin
>>
>>
>>
>>
>>
>>
>>Sanjay Choudhary <[EMAIL PROTECTED]> on 04/17/2002
>>04:08:19 PM
>>
>>Please respond to "Struts Users Mailing List"
>>      <[EMAIL PROTECTED]>
>>
>>To:   Struts Users Mailing List
>><[EMAIL PROTECTED]>
>>cc:
>>Subject:  [Q] bean:define dynamically
>>
>>
>>Hi guys,
>>
>>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:[EMAIL PROTECTED]>
>>For additional commands, e-mail: <
>>mailto:[EMAIL PROTECTED]>
>>
>>
>>
>>
>>
>>
>>
>>
> ---------------------------------------------------------------------------
> 
>>This e-mail message (including attachments, if any)
>>is intended for the use
>>of the individual or entity to which it is addressed
>>and may contain
>>information that is privileged, proprietary ,
>>confidential and exempt from
>>disclosure.  If you are not the intended recipient,
>>you are notified that
>>any dissemination, distribution or copying of this
>>communication is
>>strictly prohibited.  If you have received this
>>communication in error,
>>please notify the sender and erase this e-mail
>>message immediately.
>>
>>
> ---------------------------------------------------------------------------
> 
>>
>>--
>>To unsubscribe, e-mail:  
>><mailto:[EMAIL PROTECTED]>
>>For additional commands, e-mail:
>><mailto:[EMAIL PROTECTED]>
>>
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Tax Center - online filing with TurboTax
> http://taxes.yahoo.com/
> 
> --
> 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