RE: How to set the selected value in an select rendered by optionsCollection

2004-03-11 Thread Wendy Smoak
> From: Frank Schaare [mailto:[EMAIL PROTECTED] > > This would only be true if the action that was called > specified that form in its mapping. > Sorry, but i guess you are wrong. > The declared formBeans are digested during ActionServlets.init(). Actually, he's right. :) My advice only appli

Re: How to set the selected value in an select rendered by optionsCollection

2004-03-11 Thread Frank Schaare
Hi Hubert, This would only be true if the action that was called specified that form in its mapping. If this is a preprocessing action (that's being called to provide an HTML form with data to show), and there's no "name" attribute to tie a form to it, Struts will not create/populate a form (beca

RE: How to set the selected value in an select rendered by optionsCollection

2004-03-10 Thread Hubert Rabago
--- Wendy Smoak <[EMAIL PROTECTED]> wrote: > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > > because of the fact, that i´ve got no access to this bean in my > > preprocessing action. testSelect is a member of the upcoming > > DynaActionValidatorForm with is initiatet during the > > ta

RE: How to set the selected value in an select rendered by optionsCollection

2004-03-10 Thread Wendy Smoak
> From: Frank Schaare [mailto:[EMAIL PROTECTED] > this is where i am: there is my business object 'sb' and the upcoming > DynaActionForm. sb extends ActionForm, there should be sb.execute(). No. The execute method is in the Action, not the ActionForm. > Shall i cast my business object 'sb' ?

Re: How to set the selected value in an select rendered by optionsCollection

2004-03-10 Thread Frank Schaare
Hi Wendy, thx for your reply, but there are some questions left: this is where i am: there is my business object 'sb' and the upcoming DynaActionForm. sb extends ActionForm, there should be sb.execute(). Nope. It goes request->form creation->action. You are being passed the form in the signatur

RE: How to set the selected value in an select rendered by optionsCollection

2004-03-10 Thread Wendy Smoak
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > > in your preprocessing action class to set the value of > "testSelect", which will automatically add the SELECTED > attribute on the option tag? > because of the fact, that i´ve got no access to this bean in my > preprocessing action. testS

Re: How to set the selected value in an select rendered by optionsCollection

2004-03-10 Thread [EMAIL PROTECTED]
Hi Nagiel, if (sb.getTitle().equals("Mr.")) formularBean.setTestSelect(sb.getTitle()) in your preprocessing action class to set the value of "testSelect", which will automatically add the SELECTED attribute on the option tag? because of the fact, that i´ve got no access to this bean in my

RE: How to set the selected value in an select rendered by optionsCollection

2004-03-10 Thread Shahak.Nagiel
I'm not sure if I fully understand, but why not use: if (sb.getTitle().equals("Mr.")) formularBean.setTestSelect(sb.getTitle()) in your preprocessing action class to set the value of "testSelect", which will automatically add the SELECTED attribute on the option tag? Regards, Shahak Nag