Sorry I will look at youre things this week!
I just haven't had the time yet! I will get back to you and others who also where sending patches for these things
And then try to find the best possible solution.

johan


On 11/22/05, Laurent PETIT <[EMAIL PROTECTED]> wrote:
Hello the list,
 
I think this post is more intended to Johan, as I think I have identified him as the one working on the "Form aware things" stuff.
 
I was bit disappointed that nobody replied to the patches attempts I've submitted on the list.
Now I think this is because my post was lost at the end of another thread, so let's begin a new one concerning this area.
Please let me know if this should better be done by another mean (entry in sourceforge ... ??) but I thought that this could benefit from the Brainstorming power of the list ;-)
 
What the patch intends to "solve" is the issue with the user inputs lost with Immediate buttons (those with the setDefaultFormProcessing() set to false).
 
What I have basically done is the following :
- give a chance to every component to store the user input in its "raw" (full text) form. Then if the form is not validated (and model updated) at all in the roundtrip to the server ( via use of an Immediate Button, for example), the the user will nevertheless be presented with its previous input (his input will not be overwritten by the content of the models).
 
To do that, the solution I've implemented is to add a step in the Form.onSubmit() method, that calls what I've called "Form.registerUserInput()" method.
And in the Form class, I've refactored the initial "invalidInput" field and exploded it into 2 fields :
  - a "rawUserInput" field, used for both the case of invalidInput to represent to the user and user input not already submitted to represent to the user.
  - a "modelUpToDate" (boolean) field, used to clearly signify to getInput() method which value to use : the rawInput or the model's one.
 
 Please find in attachment full version and patch versions of both Form and FormComponent.
 
I've tried to follow your code conventions as strictly as possible, and also to write minimal explanations in the javadocs.
 
 
I would be pleased if you could give me some feedback on this, even if your conclusion is that (sniff !) it is all rubbish and should be sent in trash (re-sniff ;-)
 
Regards,
 
--
Laurent
 
 


Reply via email to