You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Kaspar Fischer <fi...@inf.ethz.ch> on 2009/03/05 10:49:45 UTC

setRequired() final?

I have a form component to select items and would like to add lower  
and upper constraints on the number of items that need to be set by  
the user. I added setMin() and setMax() methods and would like to  
override setRequired() to call setMin(1). However,  
FormComponent.setRequired is final. Is there a particular reason for  
this?

Thanks, Kaspar

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


Re: setRequired() final?

Posted by Kaspar Fischer <fi...@inf.ethz.ch>.
On 05.03.2009, at 15:11, jWeekend wrote:

> Kaspar,
>
> +1

:-) Thanks for the feedback. Good to know I'm on the right track.

Kaspar

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


Re: setRequired() final?

Posted by jWeekend <jw...@cabouge.com>.
Kaspar,

+1

Regards - Cemal
http://jWeekend.com jWeekend 


hbf wrote:
> 
> On 05.03.2009, at 10:49, Kaspar Fischer wrote:
> 
>> I have a form component to select items and would like to add lower  
>> and upper constraints on the number of items that need to be set by  
>> the user. I added setMin() and setMax() methods and would like to  
>> override setRequired() to call setMin(1). However,  
>> FormComponent.setRequired is final. Is there a particular reason for  
>> this?
> 
> On second thoughts I think I am mixing two concerns her: requiring  
> input and validation. I guess in my case, "required" is meaningless  
> (the list of selected items should not be null). And the constraint on  
> the number of items should be added via a validator.
> 
> Kaspar
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/setRequired%28%29-final--tp22348364p22352383.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: setRequired() final?

Posted by Kaspar Fischer <fi...@inf.ethz.ch>.
On 05.03.2009, at 10:49, Kaspar Fischer wrote:

> I have a form component to select items and would like to add lower  
> and upper constraints on the number of items that need to be set by  
> the user. I added setMin() and setMax() methods and would like to  
> override setRequired() to call setMin(1). However,  
> FormComponent.setRequired is final. Is there a particular reason for  
> this?

On second thoughts I think I am mixing two concerns her: requiring  
input and validation. I guess in my case, "required" is meaningless  
(the list of selected items should not be null). And the constraint on  
the number of items should be added via a validator.

Kaspar

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