2 questions:

- what is your jsp -> action sequence ie are you going form1Action -> form1.jsp
-> form2Action -> form2.jsp?  And in which form is your typelist collection?
And in which form is your type value?

- Don't understand your question about iterating.  Is it completely seperate
from the select box issue?

David





"Mannem, Taati" <[EMAIL PROTECTED]> on 05/17/2002
04:15:01 PM

Please respond to "Struts Users Mailing List"
      <[EMAIL PROTECTED]>

To:   Struts Users Mailing List
      <[EMAIL PROTECTED]>
cc:    (bcc: David Hay/Lex/Lexmark)
Subject:  RE: REg Select(Repost)



Dave..
I checked the config.xml..Thanks a lot for your help.. Somehow  the way u r
suggesting is not working and i am making it work this way..
it is associated in the config.xml....
Anyway I have found tried using collections and <html:options> as explained
in the example and then set the type by declaring a bean of scope page and
then setting the value from the form1action.and assigning in this way
<html:select value=<bean:write property=...> and so  on and it is working..
I have gt a doubt here..If u see from the struts example the collections is
an array list how do I use them if i ant to use
<logic:iterate>
say for example

java.util.ArrayList list = new java.util.ArrayList();
     list.add(new LabelValueBean("2", "3"));
      list.add(new LabelValueBean("1", "2"));
request.setAttribute("Types",list);

this is the code and the I have to iterate thru the list "list" ow do i
iterate
<logic:iterate collection:<somebean> name as define in <bean:define>
how do I iterate thru the list
should I necessarily put this in a form and get the list by getter and then
iterate..
Regards,
Taati
> -----Original Message-----
> From:   [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
> Sent:   Friday, May 17, 2002 4:03 PM
> To:     Struts Users Mailing List
> Subject:     RE: REg Select(Repost)
>
>
>
> So you're getting the"error saying form2actionform not defined in the
> scope
> null"?
>
> If so, that's obviously your problem.  Check your struts-config to check
> it is
> associated with the action that forwards to form2.jsp.
>
> Dave
>
>
>
> "Mannem, Taati" <[EMAIL PROTECTED]> on 05/17/2002
> 03:23:39 PM
>
> Please respond to "Struts Users Mailing List"
>       <[EMAIL PROTECTED]>
>
> To:   Struts Users Mailing List
>       <[EMAIL PROTECTED]>
> cc:    (bcc: David Hay/Lex/Lexmark)
> Subject:  RE: REg Select(Repost)
>
>
>
> Dave,
>      Oops that was actually a typo.. when I said yourform I meant
> form2actionform.
> Tried that but it is not orking...
> I was discussing this with joe also..
>
> Regards,
> Taati
> > -----Original Message-----
> > From:   [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
> > Sent:   Friday, May 17, 2002 3:17 PM
> > To:     Struts Users Mailing List
> > Subject:     RE: REg Select(Repost)
> >
> >
> > No, you have to replace "yourform" to YOUR form!!! ie form2actionform (I
> > think
> > in your case - whichever is associated with the select box)!
> >
> > Try that and see if it gives you anything.
> >
> > Cheers,
> >
> > David
> >
> >
> >
> >
> >
> > "Mannem, Taati" <[EMAIL PROTECTED]> on
> 05/17/2002
> > 03:05:28 PM
> >
> > Please respond to "Struts Users Mailing List"
> >       <[EMAIL PROTECTED]>
> >
> > To:   Struts Users Mailing List
> >       <[EMAIL PROTECTED]>
> > cc:    (bcc: David Hay/Lex/Lexmark)
> > Subject:  RE: REg Select(Repost)
> >
> >
> >
> > Dave,
> >      It brings null.. when it loads...
> > Hope yo have got  the csnario right..
> >
> > form1 = form1.jsp,form1action,form1actionform
> > form2=form2.jsp,form2action,form2actionform
> >
> > onsubmissiong of form1 form1action instantiates and sets the
> > form2actionform.setType="<whateverIwant">
> >
> > and then form2.jsp gets loaded but the value s still null.
> > The form scope is session in the config.xml and one more thing I get an
> > error saying yourform not defined in the scope null...
> > but if I set it imn the session in form1action it doesnt give any error
> > but
> > it doesnt work either
> >
> > Regards,
> > Taati
> > > -----Original Message-----
> > > From:   [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
> > > Sent:   Friday, May 17, 2002 3:00 PM
> > > To:     Struts Users Mailing List
> > > Subject:     RE: REg Select(Repost)
> > >
> > >
> > >
> > > Does your select box work?  ie when you submit it, is the value of the
> > > type var
> > > set correctly?  It should work in exactly the reverse order - if you
> > have
> > > called
> > > setType(x) on the same form in the action before you get to the jsp,
> > there
> > > should be no problem.  Can you try a <bean:write name="your Form"
> > > property="type"/> someone on your page and see what it produces when
> you
> > > bring
> > > up the jsp?
> > >
> > > Cheers,
> > >
> > > Dave
> > >
> > >
> > >
> > >
> > >
> > > "Mannem, Taati" <[EMAIL PROTECTED]> on
> > 05/17/2002
> > > 02:55:26 PM
> > >
> > > Please respond to "Struts Users Mailing List"
> > >       <[EMAIL PROTECTED]>
> > >
> > > To:   Struts Users Mailing List
> > >       <[EMAIL PROTECTED]>
> > > cc:    (bcc: David Hay/Lex/Lexmark)
> > > Subject:  RE: REg Select(Repost)
> > >
> > >
> > >
> > >
> > > Dave.
> > >      Thanks a lor!. If I set the value of form2 actionclass1 I am not
> > > able to retrieve the value in form2.jsp
> > > and it does not work. Can you send me some code example.
> > >
> > > Cheers,
> > > Taati
> > > > -----Original Message-----
> > > > From:   [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
> > > > Sent:   Friday, May 17, 2002 2:42 PM
> > > > To:     Struts Users Mailing List
> > > > Subject:     RE: REg Select(Repost)
> > > >
> > > >
> > > >
> > > > Setting the value of the type variable in the underlying form bean
> > > should
> > > > work.
> > > > Does for me.
> > > >
> > > > cheers,
> > > >
> > > > Dave
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > "Mannem, Taati" <[EMAIL PROTECTED]> on
> > > 05/16/2002
> > > > 04:51:42 PM
> > > >
> > > > Please respond to "Struts Users Mailing List"
> > > >       <[EMAIL PROTECTED]>
> > > >
> > > > To:   Struts Users Mailing List
> > > >       <[EMAIL PROTECTED]>
> > > > cc:    (bcc: David Hay/Lex/Lexmark)
> > > > Subject:  RE: REg Select(Repost)
> > > >
> > > >
> > > >
> > > > Sorry Guys,
> > > >      I missed some points.. The actual scenario is like this
> > > > There is a form which has to be displayed with the options ..(value
> > and
> > > > the
> > > > label) Now the databases sends me tthe value.How do i display the
> > value
> > > > chosen.Foexample I render the
> > > >      <html:select property="type">
> > > >        <html:option value="0">Year</html:option>
> > > >        <html:options collection="typeList" property="value"
> > > >      labelProperty="label"/>
> > > >      </html:select>
> > > >
> > > > select list box using this tag and as explained by MArk ad jim..
> after
> > > > this
> > > > supposing I have to show the cosen value as 2003 how do I do that. I
> > > tried
> > > > by setting the type by set type but but is not working
> > > > Here typelist is a collection which dislays the year which is again
> an
> > > > arraylist sent to me by the database.It alsos ends me the option
> > > value.How
> > > > do i set it so that it is shown correctly in the page.
> > > > I am lost!
> > > >
> > > > Regards,
> > > > Taati
> > > > > -----Original Message-----
> > > > > From:   Mannem, Taati [SMTP:[EMAIL PROTECTED]]
> > > > > Sent:   Thursday, May 16, 2002 4:09 PM
> > > > > To:     [EMAIL PROTECTED]
> > > > > Subject:     REg Select
> > > > >
> > > > > Guys,
> > > > >    I know this has bee asked but I amnot able to figure it out
> > > > > This is the scenario I have
> > > > > A form submit and it opens a form which has a list box with soime
> > data
> > > > > and when I choose the data and submit the form the previous form
> is
> > > > opened
> > > > > .. when this form is submiited again I need to se the chosen
> option
> > > but
> > > > I
> > > > > amnot able to se..
> > > > > I sued collect and used the tag in this way
> > > > >
> > > > >
> > > > > <html:select property="type">
> > > > >   <html:option value="0">Year</html:option>
> > > > >   <html:options collection="typeList" property="value"
> > > > > labelProperty="label"/>
> > > > > </html:select>
> > > > >
> > > > > How do i make sure that the data chosen in the form comes to this
> > > form..
> > > > > and
> > > > > the correctopton is chosen..
> > > > > Regards,
> > > > > Taati
> > > > >
> > > > >
> > > > > --
> > > > > 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]>
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > --
> > > 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]>
>
>
>
>
>
>
>
>
> --
> 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