> Now I am thinking to create a component ... but I don't know is this > a good approach
Sure, a panel allowing to manage addresses, sounds good. > when I put component.setRequired(true) that component checks whether > there is at least one address added into the model? You could use WizardStep#add(IFormValidator) for a validator checking the count of addresses. Hope this helps Sven On 08/23/2011 06:02 PM, nebojsa.nedic wrote: > Hello all, > > In second wizard step I would like to have an option to add several > addresses for one client (that is created in the first wizard step). I have > tried several options but none work out. > > The best one that I currently have is that I have added additional "add" > button to the wizard step which is used to add address to the client. That > works OK, but if user fills in all address fields and then clicks "Next" > instead of "add", form will be validated but no address is added (because > "add" button adds the address to the client). Then I have added additional > form validation (new AbstractFormValidator()) and checked whether at least > one address is added. Because no address is added at the beginning, I always > get an error - good idea . > > Now I am thinking to create a component that will have a model [Set<Address> > clientAddresses] but I don't know is this a good approach (and even am I > good enough to create this kind of component)? Also, I don't know how to > create component in a way that when I put component.setRequired(true) that > component checks whether there is at least one address added into the model? > > Any ideas how to solve this kind of use case? > > Thank you very much. > > Regards, > Nebojsa > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Wizard-step-adding-multiple-addresses-to-one-client-tp3763189p3763189.html > Sent from the Users forum mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
