Also please note that we're in the middle of refactoring some of the
wicket internals, and the solution as currently implemented might
change a bit still (though hopefully only the internals). Hope to be
done with the larger part after this weekend.

Eelco


On 11/25/05, Laurent PETIT <[EMAIL PROTECTED]> wrote:
> For the ones monitoring this thread,
>
> I'm pleased to announce that - thanks to Johan-, a solution to the
> problem exposed by Matej has been implemented in wicket-core.
>
> This is good news, as everybody's app users will benefit from this.
>
> And that's good for you too Matej, since it implies that you can get
> rid of the temporary speficic solution of using custon Form,
> FeedBackPanel, ....
>
> From now on, when you set defaultFormProcessing to off, the
> FormComponents that are childrens of the Form  will registered the
> user inputs in a private area, in order to be re-displayed later, be
> it because the form is invalid, or just rendered again.
>
> The behaviour when rendering again a non validated form will be the
> same as when rendering again a form that is invalid. For example: the
> form will still not be able to re-fill a <input type="file">
> component, the behaviour of the <input type="password"> component will
> still get the value of the model (and not re-render the value of the
> user input ...).
>
> For Custom Components Developer :
> just call in your own onRenderTag() method the
> FormComponent.getValue(), just as before.
>
>
> HTH
>
> --
> Laurent
>
>
> On 11/18/05, Laurent PETIT <[EMAIL PROTECTED]> wrote:
> > Whoops, the missing test files in attachment ... :-)
> >
> > On 11/18/05, Laurent PETIT <[EMAIL PROTECTED]> wrote:
> > > OK, now I have a first attempt to submit.
> > >
> > > It is what "could" be considered as a cleaner way to address Matej's
> > > initial problem.
> > > But it is a hack to the core, so it's normal that I've come up with
> > > something cleaner I think.
> > >
> > > And as it's a modification to the core, it's also more error-prone.
> > >
> > > It is too late tonight for me to explain what I did, so please for the
> > > moment take a look at the 2 new classes versions :
> > >
> > > wicket.markup.html.form.Form
> > > wicket.markup.html.form.FormComponent
> > >
> > > or the diffs files if you prefer.
> > >
> > > And I've joined 2 very basic test files (markup & class)
> > >
> > > In short : in the new version, on formSubmitted(), child form
> > > components are told that a new user input is available (method
> > > FormComponent.newUserInputAvailable()).
> > > In this method, the FormComponent stores the user input in a rawInput 
> > > field.
> > > This rawInput is then available for re-rendering for both use cases :
> > > when data is invalid and when model is not up to date (for example
> > > when returning from another page as in Matej's use case, the form will
> > > be rendered again with the rawInput, and not the model).
> > >
> > > You can see that it also frees the FormComponent code from the weird
> > > NO_INVALID_INPUT constant (by using a modelUpToDate boolean field)
> > >
> > > Fiuu, time to sleep now ! :-)
> > >
> > > regards,
> > >
> > > --
> > > laurent
> > >
> > >
> > >
> >
> >
> >
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_idv37&alloc_id865&opclick
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to