You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Tobias Gierke <to...@voipfuture.com> on 2012/10/01 13:48:08 UTC
Subclassing FormComponentPanel / propagating setRequired() to child
components ?
Hi,
With setRequired() being final, I'm not sure how to propagate a
setRequired() call to my child components ... I found some discussion
about the pro's and con's of having a final setRequired() method () (
http://apache-wicket.1842946.n4.nabble.com/VOTE-setRequired-final-or-not-td1903843.html
) but I'm still not sure how to actually apply this knowledge.
Any pointers ?
Thanks in advance,
Tobias
P.S. I'm using Wicket 1.5
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Subclassing FormComponentPanel / propagating setRequired() to
child components ?
Posted by Tobias Gierke <to...@voipfuture.com>.
Hi,
I decided to just override isRequired() on the child components and let
it delegate to FormComponentPanel.this#isRequired() ... didn't test it
yet but I suppose it should work.
Thanks for your reply!
Tobias
> Hi,
>
> Don't think you have to propagate #setRequired() to child components
> because the whole formcomponent is required. But I think you could overrive
> #checkRequired() - which is not final - to fit best your use case (which is
> called underneath by #validate())
>
> Hope this helps,
> Sebastien.
>
> On Mon, Oct 1, 2012 at 1:48 PM, Tobias Gierke
> <to...@voipfuture.com>wrote:
>
>> Hi,
>>
>> With setRequired() being final, I'm not sure how to propagate a
>> setRequired() call to my child components ... I found some discussion about
>> the pro's and con's of having a final setRequired() method () (
>> http://apache-wicket.1842946.**n4.nabble.com/VOTE-**
>> setRequired-final-or-not-**td1903843.html<http://apache-wicket.1842946.n4.nabble.com/VOTE-setRequired-final-or-not-td1903843.html>) but I'm still not sure how to actually apply this knowledge.
>>
>> Any pointers ?
>>
>> Thanks in advance,
>> Tobias
>>
>> P.S. I'm using Wicket 1.5
>>
>>
>>
>> ------------------------------**------------------------------**---------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.org<us...@wicket.apache.org>
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
--
Tobias Gierke
Development
VOIPFUTURE GmbH Wendenstraße 4 20097 Hamburg, Germany
Phone +49 40 688 900 111 Mobile +49 172 323 06 11 Fax +49 40 688 900 199
Email jan.bastian@voipfuture.com Web http://www.voipfuture.com
CEO Jan Bastian
Commercial Court AG Hamburg HRB 109896, VAT ID DE263738086
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Subclassing FormComponentPanel / propagating setRequired() to
child components ?
Posted by Sebastien <se...@gmail.com>.
Hi,
Don't think you have to propagate #setRequired() to child components
because the whole formcomponent is required. But I think you could overrive
#checkRequired() - which is not final - to fit best your use case (which is
called underneath by #validate())
Hope this helps,
Sebastien.
On Mon, Oct 1, 2012 at 1:48 PM, Tobias Gierke
<to...@voipfuture.com>wrote:
> Hi,
>
> With setRequired() being final, I'm not sure how to propagate a
> setRequired() call to my child components ... I found some discussion about
> the pro's and con's of having a final setRequired() method () (
> http://apache-wicket.1842946.**n4.nabble.com/VOTE-**
> setRequired-final-or-not-**td1903843.html<http://apache-wicket.1842946.n4.nabble.com/VOTE-setRequired-final-or-not-td1903843.html>) but I'm still not sure how to actually apply this knowledge.
>
> Any pointers ?
>
> Thanks in advance,
> Tobias
>
> P.S. I'm using Wicket 1.5
>
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.org<us...@wicket.apache.org>
> For additional commands, e-mail: users-help@wicket.apache.org
>
>