How does it not work for the integer field? Is it a primitive int type? If so you can 
set the value to zero...

For a success you could do a redirect to the same Action, which would do another 
request for the same Action and lose the first requests parameters.

Jason

> -----Original Message-----
> From: Erik Jõgi [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, November 27, 2003 4:07 PM
> To: [EMAIL PROTECTED]
> Subject: [OS-webwork] same action several times
> 
> 
> hello,
> 
> I am taking my first steps with Webwork2. Now I'm trying to 
> solve this 
> kind of situation:
> 
> The user must enter a list of products codes with their 
> quantities. I have a simple form that has two input fields 
> and an action tied to it which takes the input and passes to 
> a session scoped component that holds all the rows. I have 
> the action set up so that on success it 
> dispatches back to the same jsp. This way I achieved a simple 
> cyclic process. Also I have simple validation and when there 
> are validation errors then input result also dispatches back 
> to the same jsp. This however creates a small problem: I want 
> the form to redisplay the entered values in case of a 
> validation error but in case of successful row add I would 
> like to have a clean form. I tried to 
> set the fields in action to null but this does not work for the 
> integer quantity field.
> 
> What would you suggest I do to achieve this kind of behavior? 
> Is there some way to clean the value stack? Maybe based on the 
> result?
> 
> best regards,
> erik jogi
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program. 
> Does SourceForge.net help you be more productive?  Does it 
> help you create better code?  SHARE THE LOVE, and help us 
> help YOU!  Click Here: http://sourceforge.net/donate/ 
> _______________________________________________
> Opensymphony-webwork mailing list 
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
> 


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to