Hi Scott,

Thanks a lot for your reply. It was very useful.

Thanking You,
Chamal.

--- Scott Van Wart <[EMAIL PROTECTED]> wrote:

> chamal desilva wrote:
> > Dear Scott ,
> >
> > Thanks for your reply. 
> >
> > "If you're viewing the second account, why would
> you
> > need data for the 
> > first account?  If it's a problem of losing the
> > customer ID for the 
> > "
> >
> > I need the first account data because it is in the
> > Vector of Customer bean. So the first
> item(Account) of
> > vector will be reset when struts reset the data.
> >
> > Thanking You,
> > Chamal. 
> >   
> Can you simply load it into the bean again? 
> Typically when I set 
> something up like this (parent child relationship,
> where selecting a 
> parent lists the children, and you can click on each
> child), I'll have 
> actions like ShowAccountsAction and
> ShowAccountAction.  I use a 
> ShowCustomerForm, which takes a customer ID, and
> this form is passed to 
> the ShowAccountsAction, which populates the array so
> the subsequent page 
> can list the accounts.  When you click on an
> account, the 
> ShowAccountAction gets called, and is passed in a
> ShowAccountForm (which 
> has an account ID).  The ShowAccountAction populates
> the bean with a 
> single account.
> 
> When the account is shown, because of the
> parent-child relationship, I 
> can provide a "Back" button which will re-populate
> the ShowCustomerForm 
> with the customer ID (looked up through the account
> ID), and the account 
> list will be displayed again.  By separating
> everything, you don't have 
> to worry about what you keep in memory.  Struts
> calls the reset() method 
> on your form bean because it wants to use the form
> for something else.  
> So separate everything out and you won't have to
> worry about keeping the 
> whole list of accounts in a bean across page
> requests.
> 
> - Scott
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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

Reply via email to