Thanks alot. This looks like it will do exactly what I need. Jason
Arron wrote: > Or as I like to think of it... a banana picking plantation has more than > one monkey working a field, each monkey picking any amount of bunches, > and each bunch many bananas... similar, no? > > There's a working example here... > http://www.keyboardmonkey.com/StrutMonkey/MonkeyStruts_v2.jsp > > And to find out how it was all done, go here... > http://www.keyboardmonkey.com/struts > > And don't worry about it's future, it's now a part of Struts, and in the > nightly build. > > Arron. > > Jason B Menard wrote: > > >Hello, > > > >I am a newbie to Struts so please excuse me if this has already been > >previously discussed. > > > >I have a java bean that models a purchase request. For the sake of > >brevity we can call this the PR bean. One of the attributes of the PR > >bean is that it has one to many "products", product being another class, > >which we are mainting in the PR in a HashMap. > > > >I also will have a jsp that displays a purchase request form. Based on > >other actions the user has taken in the application, much of this form > >will be pre-filled. If I was doing a standard useBean, when displaying > >the purchase request form to the user via a jsp, the jsp would among > >other things iterate through the collection dynamically creating form > >fields, and populating the form with the contents of the PR bean. For > >example if the PR had four products, and let's say that one of the > >attributes of a product is a part number, the jsp would dynamically > >create fields named "partNumber.1", "partNumber2", etc..., and fill in > >those values on the form. > > > >My question is whether or not it is possible to do this with form beans, > >or should I stick with my current plan and not use a form bean in this > >case, just using another class to do the form validation? > > > >1. Can you model one-to-many relationships, or any other kind of > >dynamic content, with form beans? > > > >2. Upon displaying this jsp, to make sure I get it populated correctly, > >in the preceeding action would I simply create a new instance of the > >Form bean, copy the data from the PR bean to the Form bean, and then > >place the Form bean in the appropriate scope before forwarding on to the > >jsp? Is this the way this would normally be handled or is there a more > >appropriate way to do this? > > > >Thanks, > > > >Jason > > > > > >-- > >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]>