Re: [Wicket-user] Hilight erroneous form field
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
Re: [Wicket-user] Hilight erroneous form field
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
Re: [Wicket-user] Hilight erroneous form field
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
Re: [Wicket-user] Hilight erroneous form field
I used this AttributeAppender technique as well (although I tested for component#hasErrorMessage() instead ) and you can use an IVisitor from a base page to add this behavior to all of your form components automatically Aaron On Wed, 2006-07-12 at 23:52 -0700, Igor Vaynberg 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 - 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
Re: [Wicket-user] Hilight erroneous form field
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 thenformcomponent.add(new ErrorHighlighter());-Igor On 7/12/06, JK <[EMAIL PROTECTED]> wrote: Hi,Is it possible to hilight erroneus form field? If textfield data isnot 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 easierDownload 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 listWicket-user@lists.sourceforge.nethttps://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
[Wicket-user] Hilight erroneous form field
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