Hi,
You could look at creating a custom subclass of FormComponentPanel that
would contain both panel A and panel B.
Then for its validation you would process the checks that depend on the
valid values from A and B.
This way you don't need any type of "hack" and the data is naturally
available to the parent container component.
If there is an object R that contains the values from A and B you could
put the logic in convertInput() like this:
MyFormComponentPanel<R>:
protected void convertInput() {
panelA.validate();
panelB.validate();
if (panelA.isValid() && panelB.isValid()) {
R r = new R (panelA.getModelObject(), panelB.getModelObject())
setConvertedInput(r);
}
There are probably other options aswell.
Regards,
Mike
this seems a rather simple question on the first sight, but I can't seem to
find a clean solution to this.
Image you have a Panel A that allows the User to input his Passport-Data,
further image you have another Panel B, that allows you to input the
Personal Data (like Birthday), now image you need to validate
Passport-Data.
To Validate this, you need to know both Birthday (from Panel B) and the Data
from Panel A.
How to solve this Problem without Hacking around?
It seems clear, that a FormValidator is needed here... is it?
How should I validate two components, that do not know each other? Surely, I
could expose the inner components from Panel B and Panel A to a
FormValidator, OR ..
Everything looks like a Hack, is there a really clean way how to solve this
in Wicket?
Thanks in advance for ANY hints and help
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org