PDA

View Full Version : Order form with numerous lookups - how to implement


wowiesy
Aug 12th, 2007, 01:44 PM
Given a typical Order form (customer, customer details, items, item details) - in a client/server system, the customer can easily be looked up, the items can easily be looked up - especially if the user is not familiar with the customer names and the item names.

For a web application - using Spring MVC in particular (Spring controllers, JSP)- what's the best way (and how - generally) to implement such functionality? SimpleFormController provides a basic form workflow, but if I use this, I may have to override referenceData method to include all the possible lookup data (customer names & details, item numbers & details) so that the user can do a search and fill up the order, then submit the form so the order can be processsed. Seems that there is a problem to this approach especially if the data is already huge (customers and items).

Any alternatives?

Jörg Heinicke
Aug 12th, 2007, 04:44 PM
I can't really follow you. Where is th difference between a classic client/server application and a web application. In both cases you probably can't load the whole database into the memory. So what do you have in mind? Paging?

Joerg

docent
Aug 12th, 2007, 05:21 PM
It is not a great idea to load all possible data before rendering the view. What you are probably looking for is AJAX. Take a look at DWR (http://getahead.org/dwr). It is very simple to use and integrates nicely with Spring.