You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Edgar Merino <do...@gmail.com> on 2013/11/28 08:48:27 UTC

How to handle dependent properties with FormComponents

Hello, I have a class that defines 2 properties that depend on each 
other (start and end dates). Currently, I have to provide getters and 
setters for this properties and then call a validator method inside 
Form#onValidateModelObjects(). It would be preferable to just provide 
the getters and a single method to set and validate the 2 dependent 
properties.

Is there a way to accomplish this?
Thanks in advance.
Edgar Merino

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: How to handle dependent properties with FormComponents

Posted by Edgar Merino <do...@gmail.com>.
Thank you.

On 28/11/13 01:58, Martin Grigorov wrote:
> Hi,
>
> See AbstractFormValidator.
> Use any of the provided implementations of this class as inspiration.
>
>
> On Thu, Nov 28, 2013 at 9:48 AM, Edgar Merino <do...@gmail.com> wrote:
>
>> Hello, I have a class that defines 2 properties that depend on each other
>> (start and end dates). Currently, I have to provide getters and setters for
>> this properties and then call a validator method inside
>> Form#onValidateModelObjects(). It would be preferable to just provide the
>> getters and a single method to set and validate the 2 dependent properties.
>>
>> Is there a way to accomplish this?
>> Thanks in advance.
>> Edgar Merino
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: How to handle dependent properties with FormComponents

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

See AbstractFormValidator.
Use any of the provided implementations of this class as inspiration.


On Thu, Nov 28, 2013 at 9:48 AM, Edgar Merino <do...@gmail.com> wrote:

> Hello, I have a class that defines 2 properties that depend on each other
> (start and end dates). Currently, I have to provide getters and setters for
> this properties and then call a validator method inside
> Form#onValidateModelObjects(). It would be preferable to just provide the
> getters and a single method to set and validate the 2 dependent properties.
>
> Is there a way to accomplish this?
> Thanks in advance.
> Edgar Merino
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>