maybe have FormComponentFeedbackBorders for the individual components and then a global feedback panel to catch the general ones (install a filter to ignore reporters that have feedback borders)
Carlos Pita-4 wrote: > > Hi all, > > suppose you have to implement some form input component that is > composed from other simple FormComponents. These simple input fields > will be ajax-validated individually, and they will be subject to some > global (inter-field) validation too. An example could be three > drop-downs for a date, with local validation requiring each field and > global validation asking for a valid Gregorian calendar date. AFAIK > there are nothing like nested forms in wicket, you have a form and > then at the next level its FormComponents and that's all. So I tend to > think of a static helper method that instantiates the individual form > fields and registers them with the form. Maybe there must be some > "synthetic" invisible component just to attach feedback from the date > global-validation, which will be implemented as a form validator. For > example: > > class MyForm extends Form { > > public MyForm(String id) { > .... > DateComponent.add(this, "birthDate"); > .... > } > } > > <select wicket:id="birthDate.day"/> > > > <select wicket:id="birthDate.month"/> > > > <select wicket:id="birthDate.year"/> > > > <!-- dummy component --> > > > > There are two things in this approach that I don't particularly like: > > 1) Having a dummy component to attach date global-validation errors > (notice that they are not the same as form errors). > > 2) The procedural nature of the solution, there is no real Date component. > > What do you think? Do you have a better alternative that is not too > convolved? > > Best regards, > Carlos > > ------------------------------------------------------------------------- > 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.php&p=sourceforge&CID=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/Form-macro-component-tf3549549.html#a9911009 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.php&p=sourceforge&CID=DEVDEV _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user