if you want a truly decoupled way to do this because the components live in completely different places you can do this:
* override form#onvalidate and send out an event, lets say FormValidateEvent * the paymentmethod group can listen for this event and when it receives it it can send out a ValidatePaymentGroupEvent(getConvertedInput()) * then its just a matter of listening to the VPGE in the correct country components and calling error() on the right component -igor On Sat, Oct 1, 2011 at 12:02 AM, Per Newgro <[email protected]> wrote: > Hello everybody, > > My environment: Wicket 1.5 > My usecase: Validate that payment method "cash in advance" is only accepted > for shipping countries (DE, AT, CH). > My rule: No different shipping country -> ship to invoice country, otherwise > ship to shipping country. > My problem: Payment method is a group of radios on payment method panel. The > shipping country is part of shipping address panel > and the invoice country is part of invoice address panel. The components are > enclosed in local forms and form component labels. > The compoent structure is deep, but they all share the same root form. > > How can i solve this in an elegant way? > Should / Can i use the new event system? > Is it better to use a visitor? > Maybe there is already a blog or example for that? > > Would be great if someone could give me a hint. > Thanks > Per > > > --------------------------------------------------------------------- > 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]
