aspose file tools*
The moose likes Other Application Frameworks and the fly likes formBankingObject for n number of lineItems Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "formBankingObject for n number of lineItems" Watch "formBankingObject for n number of lineItems" New topic
Author

formBankingObject for n number of lineItems

Kashif Mughal
Ranch Hand

Joined: Jun 19, 2008
Posts: 44
Hi, I have an order form in which user can dynamically generate n number of lineItems to book the order. But I am wondering how to setup the order as formBackingObject to handle n number of lineItems on the fly.Also, Order has Set of lineItems.


Thanks in Advance,
Kash.
tapeshwar sharma
Ranch Hand

Joined: Mar 10, 2006
Posts: 245
Google for ListUtils.lazyList(...) function in the Apache Commons Collections library.That should do.
Kashif Mughal
Ranch Hand

Joined: Jun 19, 2008
Posts: 44
Thanks Parshant,
I am wondering if there is any solution available in springframework? Also Can you put some more light how lazyList() can be used with reference to the formBackingObject, As it requires the actual object loaded before form loads. But in this scenario we are not sure about the number of lineItems user will add ?
During search i found PagedListHolder, is it any use ?
Again excuse my little spring knowledge.
tapeshwar sharma
Ranch Hand

Joined: Mar 10, 2006
Posts: 245
Ok, let's try. The following information should not be taken literally.
I am just giving you an idea.It is up to you to do some hit and trial to make it work.

1)In the command Object, define something like:


2) Use logic:iterate in the jsp to display the list of the order lines.
Initially, you can insert some data through the back end to see what a generated text field will look like.
As an example, this will give you a input text field like :

If you are adding the order lines dynamically, then most probably you'll be using javascript.Make sure that you create the new order line text object using the same indexing and naming.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: formBankingObject for n number of lineItems