On 9/11/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
oh yeah, i also want to move ivalidator and friends out of wicket.markup.html.form.validation into wicket.validation, anyone against? 2.0 only of course.
-IgorOn 9/11/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:first pass of this is in svn, so now is the time to look over it and complain about something.
the javadoc is not finished but it is coming tomorrow morning so no need to complain about that just yet.
it feels so good to finish the day at 1am working on wicket! no joke, havent had the chance to do this in a while :)
-IgorOn 9/4/06, Igor Vaynberg < [EMAIL PROTECTED]> wrote:i am working on an app that uses wicket and remoting, so i need to do validation in wicket and in the business layer. the problem is that our validators do not translate well into the business layer, and i hate to write them twice. i can do all the validation in the service layer, but then it is not trivial to map the errors back to the form components if you need formcomponent precise errors for the ui.
to ease the pain i was thinking of something like this
IValidationContext { Object getValue(); void error(List,Map); }
and FormComponent implements IValidationContext
where getValue would map onto getConvertedInput() and error would map directly (obviously we already have getvalue() so it would have to be called something else)
it still lacks but at least i would be able to reuse the same validators in a non-wicket context. it also would be great to provide a seperate wicket-validation.jar or some such.
what do you guys think? i havent thought this through in any amount of detail, so perhaps there are better ways to do this.
error(List,Map) is a bit dirty as well, maybe it can be cleaned up somehow.
it will also make validators easier to understand because when you see validate(FormComponent) your first thought is "what the hell do i do now?" where some sort of IValidationContext would be more expressive and guide the user better.
-Igor
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-develop mailing list
Wicket-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-develop
------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________ Wicket-develop mailing list Wicket-develop@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-develop