Re: Inter-Component Validation (or how to marry two strangers)

2010-09-22 Thread Igor Vaynberg
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

Re: Inter-Component Validation (or how to marry two strangers)

2010-09-22 Thread nino martinez wael
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

Re: Inter-Component Validation (or how to marry two strangers)

2010-09-22 Thread splitshade
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:

Re: Inter-Component Validation (or how to marry two strangers)

2010-09-22 Thread Igor Vaynberg
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

Re: Inter-Component Validation (or how to marry two strangers)

2010-09-22 Thread 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

Re: Inter-Component Validation (or how to marry two strangers)

2010-09-22 Thread Michael O'Cleirigh
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

Re: Inter-Component Validation (or how to marry two strangers)

2010-09-22 Thread Igor Vaynberg
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

Re: Inter-Component Validation (or how to marry two strangers)

2010-09-22 Thread splitshade
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: