Re: R: repost: validator & retrieving data
> Ok. So an action prepares the collection for the select. > The other one initializes the form with data from DB. > > To which one should I set the input property of the "save" action? > If I set it to the second one (which initializes the form) I will > have the same problem... should this action retrieve data from the db > or simply leave it as is because it contains invalid data entered by > the user? > > I think having 2 actions doesn't help here... - The first action just initializes the form - The second action prepares the collection for the select. (This is just an helper for the viewer, it can even be a filter) The input for the save action is the second action or the jsp page if you use a filter. Am i missing something? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: repost: validator & retrieving data
> "If there are 2 actions, one to "prepare" the page and > one to "process" the user input, we define the input attribute > value of the "process" action mapping to be the URL of the > "prepare" action." I think it's right, I think it's right only in simple cases If your "prepare" means: - Putting in the request a collection for a select (for example) - Initializing the form with data from DB or any other source You are doing 2 things completely different (logically) in the same action and that's why you need a workaround with hidden fields or hard coded path or The cleanest solution is to separate this "prepare" action in 2 actions. Too much? OK! Choose any other way you like! But it won't be "clean". - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]