Subclassing FormComponentPanel / propagating setRequired() to child components ?

2012-10-01 Thread Tobias Gierke

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-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Subclassing FormComponentPanel / propagating setRequired() to child components ?

2012-10-01 Thread Sebastien
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
tobias.gie...@voipfuture.comwrote:

 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.htmlhttp://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.orgusers-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




Re: Subclassing FormComponentPanel / propagating setRequired() to child components ?

2012-10-01 Thread Tobias Gierke

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
tobias.gie...@voipfuture.comwrote:


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.htmlhttp://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.orgusers-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@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.bast...@voipfuture.com   Web http://www.voipfuture.com
 
CEO Jan Bastian


Commercial Court AG Hamburg   HRB 109896, VAT ID DE263738086



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