File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

formBankingObject for n number of lineItems

 
Kashif Mughal
Ranch Hand
Posts: 44
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
tapeshwar sharma
Ranch Hand
Posts: 245
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Google for ListUtils.lazyList(...) function in the Apache Commons Collections library.That should do.
 
Kashif Mughal
Ranch Hand
Posts: 44
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 245
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic