something has to know that both fields are related, so what is that
in your code?
-igor
On Wed, Sep 22, 2010 at 9:51 AM, splitshade
martin.dil...@googlemail.com wrote:
Hi,
this seems a rather simple question on the first sight, but I can't seem to
find a clean solution to this.
Image you
I had something similar, I can look it up tomorrow(in 15 hours or so).
I think it was something like making the validators aware of each
other or something.
2010/9/22 splitshade martin.dil...@googlemail.com:
Hi,
this seems a rather simple question on the first sight, but I can't seem to
Hi,
thanks for the reply,
well.. good question, this would propably be the validator, i need to check
the validity of the personal data fields before the form gets submitted.
--
View this message in context:
validator on which field? or on a form? in either case something has
to be aware of both fields. a clean way may be to let your data model
validate itself for consistency and propagate any exceptions to the ui
layer as errors.
-igor
On Wed, Sep 22, 2010 at 10:34 AM, splitshade
Hi again,
well, i think the validator would be applied to the form, to which both
panels are added, but you are right, there is nothing that is aware of both
components (or more exactly on the inner components of the panels).
Model-Validation sounds good, but the Model itself is updated after
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
no, it is not that common because you still have not defined what the
common object that knows about both values is. usually this is the
model, and it is not that uncommon to do this:
new form() {
onsubmit() {
if (!getmodel().validate()) { error(something went bad); }
}
}
ie validate
Hi,
ok, that sounds pretty good...
If that is not uncommon to do, I'll try that.
I'm really impressed, how fast you helped me here, thank you very much!
--
View this message in context: