Found it! Thank you!
                        
                        this.visitFormComponents( new FormComponent.IVisitor()
                        {
                                public void formComponent(FormComponent 
formComponent)
                                {
                                        formComponent.add(new 
ErrorHighlighter());
                                }
                        });

2006/7/13, JK <[EMAIL PROTECTED]>:
> Thank you very much! It works when you use (Wicket 1.2):
>
>               super("class", true, new Model("error"), " ");
>
> I didn't understand how you can use an IVisitor from a base page.
>
> 2006/7/13, Martijn Dashorst <[EMAIL PROTECTED]>:
> > Giving your web designers a better ride, you could do:
> >
> > super("class", true, "error", " ");
> >
> > and have your designer do the css thing for you:
> >
> > .error {
> >     background-color : red;
> > }
> >
> > .error:after {
> >     content : "!!!";
> >     color : red;
> >     font-weight: bolder;
> > }
> >
> > (last one doesn't work in IE though)
> >
> > Martijn
> >
> > On 7/13/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> > > dont quote me but...
> > >
> > > class ErrorHighlighter extends AttributeAppender {
> > >  private FormComponent fc;
> > >
> > >   public ErrorHighlighter() {
> > >        super("style", true, "background-color:red;", " ");
> > >    }
> > >
> > >   public void bind(Component c) { fc=(FormComponent)c; }
> > >
> > >    public boolean isEnabled() { return !fc.isValid(); }
> > > }
> > >
> > > and then
> > >
> > > formcomponent.add(new ErrorHighlighter());
> > >
> > > -Igor
> > >
> > >
> > >
> > > On 7/12/06, JK <[EMAIL PROTECTED]> wrote:
> > > > Hi,
> > > >
> > > > Is it possible to hilight erroneus form field? If textfield data is
> > > > not valid how do you change field background color?
> > > >
> > > > Thanks!
> > > >
> > > >
> > > >
> > > -------------------------------------------------------------------------
> > > > 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
> > >
> > >
> > >
> >
> >
> > --
> > Download Wicket 1.2 now! Write Ajax applications without touching 
> > JavaScript!
> > -- http://wicketframework.org
> >
> >
> > -------------------------------------------------------------------------
> > 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