Sorry to repost this question but it still has me wondering...

Say you have a form where a user is to select "An Order To Update" from
an options list. Now also assume that these orders to choose from change
very frequently. You also will need to validate the form when it's
submitted.

* Where is it best to repopulate this type of dynamic list
(example above: 'orders')? The list of orders that make up the
options list needs to be repopulated somewhere in case validation
returns false and returns the user to the form page again.  

It seems like you have three choices:

1) In the reset method repopulate the list by making a call to business
layer to get back your list and put in scope (or maybe even directly
into FormBean).

2) Use session scope so the list is available at all times until
repopulated by some setUp type of action.

3) Possibly set this list in application scope upon container start up
and maybe have a thread running that periodically updates the list and
put the new list back into application scope.

Are there any other options available? I happen to like #1 the best but
I'm wondering what others think. I don't really like option 2 as it
requires a form to be put into session scope that really doesn't need to
be there (apart from the re-population of lists). Also a pain to monitor
cleaning the form out of session when it is no longer needed. Option 3
would be ok if the information in the list rarely changed, but if it's
data that changes very frequently I wouldn't want to rely on some time
interval to have to go by before getting fresh data.

Curious what other's thoughts are on this situation.

Thanks,

-- 
Rick

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to