Hello Fellow Stripers,
We are currently developing a Stripes Wizard where one of the wizard
steps is to select a subset of items from a list of available items.
Selection is denoted by specifying a quantity greater than zero for an
item. A typical request from this selection page (abridged as there are
about ten fields per item) would look something like:
item[0].quantity=2
item[1].quantity=0
item[2].quantity=4
item[3].quantity=0
item[4].quantity=0
item[5].quantity=3
The next step is the wizard review page and we only display items
with positive quantities. The challenge we are running into is that the
wizard still generates hidden fields for all of the items with zero
quantities because they were submitted on the previous request. This is
an issue because the user can be selecting from a list of several
hundred available items and they may have only selected thirty.
We already tried pruning the data in the event handler by removing
the zero-quantity items from the list but that was unsuccessful. It
would display three items on the review page but the request-first
population strategy meant quantities were 2,0,4 instead of 2,4,3 plus
hidden fields were still generated for item[3], item[4], and item[5].
We have tossed around ideas internally about doing things either before
the form submit in JavaScript or in an interceptor but those seem
impractical due to potential validation errors from data binding or a
custom validation method.
So right now we don't know how to prune data from the wizard process
so that a) handling validation errors works properly b) only the
selected items are displayed on the review page and the new indices
rendered on the JSP are in sync with data from their old indices on the
request c) hidden fields are not written out for data present in the
request but not rendered to the form.
Any insight or guidance on doing anything like this with the Stripes
Wizard would be greatly appreciated.
Thanks,
Ed
The information contained in this message and any attachments is intended only
for the use of the individual or entity to which it is addressed, and may
contain information that is PRIVILEGED, CONFIDENTIAL, and exempt from
disclosure under applicable law. If you are not the intended recipient, you
are prohibited from copying, distributing, or using the information. Please
contact the sender immediately by return e-mail and delete the original message
from your system.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users