Re: [Wicket-user] Highlighting error components
THanks for your help. It worked. Gennadiy - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Highlighting error components
Hello All, I have the following question: Doing the business validation I need to say that compoents a, b ,c d out of the form that has 10-15 components are invalid and show just 1 error message. In other words I can not use the build in valdiation by itself since all those fields by themselves are fine but their combination is not valid. ANd the business wants to see jsut one error message on top, but have all of the fields that failed validation highlighted. What would you suggest is a best way to approach it. THank you Genandiy - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Highlighting error components
On Fri, 19 Jan 2007, [EMAIL PROTECTED] wrote: message. In other words I can not use the build in valdiation by itself since all those fields by themselves are fine but their combination is not valid. ANd the business wants to see jsut one error message on top, but have all of the fields that failed validation highlighted. What would you suggest is a best way to approach it. I would look at Form.add(IFormValidator validator). To put a common error message at top, just add a FeedbackPanel that is a direct child of the form. - Timo -- Timo Rantalaiho Reaktor Innovations OyURL: http://www.ri.fi/ - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Highlighting error components
final Form form...; add(new WebMarkupContainer(form-error) { isvisible() { return form.hasError(); }}); div wicket:id=form-errorForm contains errors/div ^wrap in a panel instead of wmc to make reusable class ErrorHighglither extends AbstractBehavior { private FormComponent fc; public void bind(Component c) { /// check c is formcomponent this.fc=(formcomponent)c; } public void oncomponenttag(tag) { if (!fc.isvalid()) { tag.put(class, error); } } } new TextField(foo).add(new ErrorHighglighter(); } -igor On 1/19/07, Timo Rantalaiho [EMAIL PROTECTED] wrote: On Fri, 19 Jan 2007, [EMAIL PROTECTED] wrote: message. In other words I can not use the build in valdiation by itself since all those fields by themselves are fine but their combination is not valid. ANd the business wants to see jsut one error message on top, but have all of the fields that failed validation highlighted. What would you suggest is a best way to approach it. I would look at Form.add(IFormValidator validator). To put a common error message at top, just add a FeedbackPanel that is a direct child of the form. - Timo -- Timo Rantalaiho Reaktor Innovations OyURL: http://www.ri.fi/ - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Highlighting error components
The wiki has an example of how to write this kind of validator: http://cwiki.apache.org/WICKET/validating-related-fields.html Timo Rantalaiho wrote: On Fri, 19 Jan 2007, [EMAIL PROTECTED] wrote: message. In other words I can not use the build in valdiation by itself since all those fields by themselves are fine but their combination is not valid. ANd the business wants to see jsut one error message on top, but have all of the fields that failed validation highlighted. What would you suggest is a best way to approach it. I would look at Form.add(IFormValidator validator). To put a common error message at top, just add a FeedbackPanel that is a direct child of the form. - Timo -- Timo Rantalaiho Reaktor Innovations OyURL: http://www.ri.fi/ - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/previous-page-tf2213157.html#a8453693 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user