except that you don't have that extra interface. The component can just be the IFormValidator..
But i don't think that will solve his first example.. Where he just added 2 textfields in a ListItem
and wanted to validate those 2. Which component is then the supplier? One of the textfields?

johan


On 8/10/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
thats pretty much what joni suggested!

-Igor


On 8/10/06, Johan Compagner <[EMAIL PROTECTED]> wrote:
it does work really differnet then wat we do now.
And with a panel it looks maybe nice. But it is a but more blown up code.
Personally i like this then better:

IFormValidator
{
  validate(Form)
}

MyPanel implements IFormValidator
{
    validate()
    {
            validate the panel.
    }
}

and the Form searches for IFormValidator implementors in its tree (besides the normal onces it already has)
and takes those also into account.

Much cleaner and not so verbose in code if you ask me..

johan

On 8/10/06, Igor Vaynberg < [EMAIL PROTECTED]> wrote:
personally i like the visitor joni proposed - it doesnt need to be part of core but it solves the problem elegantly. i recently factored out form.validateFormValidator(IFormValidator v) that maeks the usecase even simpler to implement.

-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-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user




-------------------------------------------------------------------------
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-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user



-------------------------------------------------------------------------
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-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to