Re: [Wicket-user] How to customize multiple validate message in ListView ?
yeah that is pretty much how swing also works.But FormComponentLabel isn't a Label (it extends markupcontainer) why is that ?because now you can't give that formcomponentlabel the i18n text it should displayAnd then we could make a link somehow that a formcomponent knows its label and gets the modelobject from that which is the text it will use to display it. Then you don't have to specify it twice. (the text in a Label component and in the setLabel())But the end result will pretty much be the same. Just looking how it is easier to use/find. johanOn 6/30/06, Igor Vaynberg [EMAIL PROTECTED] wrote: we already have something like that, but works in reverse, see FormComponentLabel -Igor On 6/30/06, Johan Compagner [EMAIL PROTECTED] wrote: yes it is not really visibleThe only fix for this that is see is make it a constructor param for formcomponents.But this will polute it big time again.Or that we could use something like labelFor() (like swing) where a label that is in front of the form component is the labelFor of that component. And we get the label that it displays out of it. (i guess that is wat you want 99% of the time)johan On 6/30/06, Igor Vaynberg [EMAIL PROTECTED] wrote: yes it would, this is how i wanted our default error messages to work, but i guess other core committers dont think people use setLabel() that often on form components and looks like they were right -Igor On 6/29/06, cowwoc [EMAIL PROTECTED] wrote: Ah! Would this also work for what I just posted too?GiliIgor Vaynberg wrote: if you do textfield.setLabel(new ResourceModel(label.field1)) and define validator message as ${label} is required which it already is defined like that i think you will get the desired message with key label.field1 in the properties file defning the name of the field, or do setLabel(new Model(first name)) -Igor On 6/29/06, *Ingram Chen* [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] wrote: I have a table of data need to do form submission:Name Data === Item1[ ] Item2[ ] new ListView(items, items) {populateItem(ListItem item) { item.add(new Lebel(name) item.add(new RequiredTextField(data)); } } ; if I leave all data blank, I will got multiple messages with the same messages: 'data' is required. 'data' is required. which is useless for clientIt seems that RequiredValidator, NumberValidator... etcdon't allow to do things like: data.RequiredValidator= Data of ${0} is required. and produce messages as: Data of Item1 is required. Data of Item2 is required. Should I need to write my own Validator ? if so, how to do that ? Thanks. -- Ingram Chen Java [EMAIL PROTECTED] Institue of BioMedical Sciences Academia Sinica Taiwan blog: http://www.javaworld.com.tw/roller/page/ingramchen 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=lnkkid=120709bid=263057dat=121642 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net mailto: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=lnkkid=120709bid=263057dat=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 easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___Wicket-user mailing list Wicket-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 easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimohttp://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___Wicket-user mailing listWicket-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
Re: [Wicket-user] How to customize multiple validate message in ListView ?
its linked in reverse, the label is specified on the formcomponent via setlabel and the formcomponentlabel is linked to the formcomponent eg new SimpleFormComponentLabel(id, formcomponent)-Igor On 7/1/06, Johan Compagner [EMAIL PROTECTED] wrote: yeah that is pretty much how swing also works.But FormComponentLabel isn't a Label (it extends markupcontainer) why is that ?because now you can't give that formcomponentlabel the i18n text it should display And then we could make a link somehow that a formcomponent knows its label and gets the modelobject from that which is the text it will use to display it. Then you don't have to specify it twice. (the text in a Label component and in the setLabel())But the end result will pretty much be the same. Just looking how it is easier to use/find. johanOn 6/30/06, Igor Vaynberg [EMAIL PROTECTED] wrote: we already have something like that, but works in reverse, see FormComponentLabel -Igor On 6/30/06, Johan Compagner [EMAIL PROTECTED] wrote: yes it is not really visibleThe only fix for this that is see is make it a constructor param for formcomponents.But this will polute it big time again.Or that we could use something like labelFor() (like swing) where a label that is in front of the form component is the labelFor of that component. And we get the label that it displays out of it. (i guess that is wat you want 99% of the time)johan On 6/30/06, Igor Vaynberg [EMAIL PROTECTED] wrote: yes it would, this is how i wanted our default error messages to work, but i guess other core committers dont think people use setLabel() that often on form components and looks like they were right -Igor On 6/29/06, cowwoc [EMAIL PROTECTED] wrote: Ah! Would this also work for what I just posted too?GiliIgor Vaynberg wrote: if you do textfield.setLabel(new ResourceModel(label.field1)) and define validator message as ${label} is required which it already is defined like that i think you will get the desired message with key label.field1 in the properties file defning the name of the field, or do setLabel(new Model(first name)) -Igor On 6/29/06, *Ingram Chen* [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] wrote: I have a table of data need to do form submission:Name Data === Item1[ ] Item2[ ] new ListView(items, items) {populateItem(ListItem item) { item.add(new Lebel(name) item.add(new RequiredTextField(data)); } } ; if I leave all data blank, I will got multiple messages with the same messages: 'data' is required. 'data' is required. which is useless for clientIt seems that RequiredValidator, NumberValidator... etcdon't allow to do things like: data.RequiredValidator= Data of ${0} is required. and produce messages as: Data of Item1 is required. Data of Item2 is required. Should I need to write my own Validator ? if so, how to do that ? Thanks. -- Ingram Chen Java [EMAIL PROTECTED] Institue of BioMedical Sciences Academia Sinica Taiwan blog: http://www.javaworld.com.tw/roller/page/ingramchen 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=lnkkid=120709bid=263057dat=121642 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net mailto: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=lnkkid=120709bid=263057dat=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 easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___Wicket-user mailing list Wicket-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 easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache
Re: [Wicket-user] How to customize multiple validate message in ListView ?
yes it is not really visibleThe only fix for this that is see is make it a constructor param for formcomponents.But this will polute it big time again.Or that we could use something like labelFor() (like swing) where a label that is in front of the form component is the labelFor of that component. And we get the label that it displays out of it. (i guess that is wat you want 99% of the time)johanOn 6/30/06, Igor Vaynberg [EMAIL PROTECTED] wrote: yes it would, this is how i wanted our default error messages to work, but i guess other core committers dont think people use setLabel() that often on form components and looks like they were right -Igor On 6/29/06, cowwoc [EMAIL PROTECTED] wrote: Ah! Would this also work for what I just posted too?GiliIgor Vaynberg wrote: if you do textfield.setLabel(new ResourceModel(label.field1)) and define validator message as ${label} is required which it already is defined like that i think you will get the desired message with key label.field1 in the properties file defning the name of the field, or do setLabel(new Model(first name)) -Igor On 6/29/06, *Ingram Chen* [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] wrote: I have a table of data need to do form submission:Name Data === Item1[ ] Item2[ ] new ListView(items, items) {populateItem(ListItem item) { item.add(new Lebel(name) item.add(new RequiredTextField(data)); } } ; if I leave all data blank, I will got multiple messages with the same messages: 'data' is required. 'data' is required. which is useless for clientIt seems that RequiredValidator, NumberValidator... etcdon't allow to do things like: data.RequiredValidator= Data of ${0} is required. and produce messages as: Data of Item1 is required. Data of Item2 is required. Should I need to write my own Validator ? if so, how to do that ? Thanks. -- Ingram Chen Java [EMAIL PROTECTED] Institue of BioMedical Sciences Academia Sinica Taiwan blog: http://www.javaworld.com.tw/roller/page/ingramchen 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=lnkkid=120709bid=263057dat=121642 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net mailto: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=lnkkid=120709bid=263057dat=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 easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___Wicket-user mailing list Wicket-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 easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimohttp://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___Wicket-user mailing listWicket-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=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] How to customize multiple validate message in ListView ?
I have a table of data need to do form submission: Name Data === Item1 [ ] Item2 [ ] new ListView(items, items) { populateItem(ListItem item) { item.add(new Lebel(name) item.add(new RequiredTextField(data)); }} ;if I leave all data blank, I will got multiple messages with the same messages:'data' is required.'data' is required. which is useless for client It seems that RequiredValidator, NumberValidator... etcdon't allow to do things like: data.RequiredValidator= Data of ${0} is required. and produce messages as:Data of Item1 is required.Data of Item2 is required. Should I need to write my own Validator ? if so, how to do that ?Thanks.-- Ingram ChenJava [EMAIL PROTECTED]Institue of BioMedical Sciences Academia Sinica Taiwanblog: http://www.javaworld.com.tw/roller/page/ingramchen 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=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] How to customize multiple validate message in ListView ?
if you do textfield.setLabel(new ResourceModel(label.field1)) and define validator message as ${label} is required which it already is defined like that i think you will get the desired message with key label.field1 in the properties file defning the name of the field, or do setLabel(new Model(first name)) -Igor On 6/29/06, Ingram Chen [EMAIL PROTECTED] wrote: I have a table of data need to do form submission: Name Data === Item1 [ ] Item2 [ ] new ListView(items, items) { populateItem(ListItem item) { item.add(new Lebel(name) item.add(new RequiredTextField(data)); }} ;if I leave all data blank, I will got multiple messages with the same messages:'data' is required.'data' is required. which is useless for client It seems that RequiredValidator, NumberValidator... etcdon't allow to do things like: data.RequiredValidator= Data of ${0} is required. and produce messages as:Data of Item1 is required.Data of Item2 is required. Should I need to write my own Validator ? if so, how to do that ?Thanks.-- Ingram ChenJava [EMAIL PROTECTED]Institue of BioMedical Sciences Academia Sinica Taiwan blog: http://www.javaworld.com.tw/roller/page/ingramchen 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 Geronimohttp://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___Wicket-user mailing listWicket-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=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] How to customize multiple validate message in ListView ?
I also ran into similar problems. I had a NumberValidator and the default message was: '0' is not in the range 1-65535 (limits which I had set), which is nice and all but it would be nice if it mentioned which field contained the invalid value instead. For example, I would have preferred a default of Field 'port' must have values in the range 1-65535. Just my 2 cents... Gili Ingram Chen wrote: I have a table of data need to do form submission: Name Data === Item1 [ ] Item2 [ ] new ListView(items, items) { populateItem(ListItem item) { item.add(new Lebel(name) item.add(new RequiredTextField(data)); } } ; if I leave all data blank, I will got multiple messages with the same messages: 'data' is required. 'data' is required. which is useless for client It seems that RequiredValidator, NumberValidator... etc don't allow to do things like: data.RequiredValidator= Data of ${0} is required. and produce messages as: Data of Item1 is required. Data of Item2 is required. Should I need to write my own Validator ? if so, how to do that ? Thanks. -- Ingram Chen Java [EMAIL PROTECTED] Institue of BioMedical Sciences Academia Sinica Taiwan blog: http://www.javaworld.com.tw/roller/page/ingramchen 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=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user signature.asc Description: OpenPGP digital signature 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=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] How to customize multiple validate message in ListView ?
yes it would, this is how i wanted our default error messages to work, but i guess other core committers dont think people use setLabel() that often on form components and looks like they were right-Igor On 6/29/06, cowwoc [EMAIL PROTECTED] wrote: Ah! Would this also work for what I just posted too?GiliIgor Vaynberg wrote: if you do textfield.setLabel(new ResourceModel(label.field1)) and define validator message as ${label} is required which it already is defined like that i think you will get the desired message with key label.field1 in the properties file defning the name of the field, or do setLabel(new Model(first name)) -Igor On 6/29/06, *Ingram Chen* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: I have a table of data need to do form submission:Name Data === Item1[ ] Item2[ ] new ListView(items, items) {populateItem(ListItem item) { item.add(new Lebel(name) item.add(new RequiredTextField(data)); } } ; if I leave all data blank, I will got multiple messages with the same messages: 'data' is required. 'data' is required. which is useless for clientIt seems that RequiredValidator, NumberValidator... etcdon't allow to do things like: data.RequiredValidator= Data of ${0} is required. and produce messages as: Data of Item1 is required. Data of Item2 is required. Should I need to write my own Validator ? if so, how to do that ? Thanks. -- Ingram Chen Java [EMAIL PROTECTED] Institue of BioMedical Sciences Academia Sinica Taiwan blog: http://www.javaworld.com.tw/roller/page/ingramchen 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=lnkkid=120709bid=263057dat=121642 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net mailto: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=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-userUsing 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=lnkkid=120709bid=263057dat=121642___Wicket-user mailing list Wicket-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=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user