You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Uwe Schäfer <sc...@thomas-daily.de> on 2008/08/26 11:09:53 UTC

Convenience

hi

following a pattern i´ve read anywhere (can´t remember), especially when 
chaining calls, i´d love to be able to:

new TextField(..).setRequired().setVisible().setEnabled()
instead of having to
new TextField(..).setRequired(true).setVisible(true).setEnabled(true)

what do you think ?

cu uwe

PS: just in case: i know about the defaults as well as 
RequiredTextField, which is not the point ;)

-- 

THOMAS DAILY GmbH
Adlerstraße 19
79098 Freiburg
Deutschland
T  + 49 761 3 85 59 0
F  + 49 761 3 85 59 550
E  schaefer@thomas-daily.de
www.thomas-daily.de

Geschäftsführer/Managing Directors:
Wendy Thomas, Susanne Larbig
Handelsregister Freiburg i.Br., HRB 3947

Registrieren Sie sich unter http://morningnews.thomas-daily.de für die 
kostenfreien TD Morning News, eine Auswahl aktueller Themen des Tages 
morgens um 9:00 in Ihrer Mailbox.

Hinweis: Der Redaktionsschluss für unsere TD Morning News ist täglich um 
8:30 Uhr. Es werden vorrangig Informationen berücksichtigt, die nach 
16:00 Uhr des Vortages eingegangen sind. Die Email-Adresse unserer 
Redaktion lautet redaktion@thomas-daily.de.


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


Re: Convenience

Posted by Uwe Schäfer <sc...@thomas-daily.de>.
Martijn Dashorst schrieb:

hi martijn

> For each setFoo action you would get a setNotFoo action, and
> corresponding isNotFoo query.

i was not thinking about unsetFoo() methods, really.
and !isVisible() is afaik clearer than isNotVisible(), i would not 
suggest that.

i´d be perfectly alright with just adding
void setX(){setX(true);}

and keep the rest the way it is.

cu uwe
-- 

THOMAS DAILY GmbH
Adlerstraße 19
79098 Freiburg
Deutschland
T  + 49 761 3 85 59 0
F  + 49 761 3 85 59 550
E  schaefer@thomas-daily.de
www.thomas-daily.de

Geschäftsführer/Managing Directors:
Wendy Thomas, Susanne Larbig
Handelsregister Freiburg i.Br., HRB 3947

Registrieren Sie sich unter http://morningnews.thomas-daily.de für die 
kostenfreien TD Morning News, eine Auswahl aktueller Themen des Tages 
morgens um 9:00 in Ihrer Mailbox.

Hinweis: Der Redaktionsschluss für unsere TD Morning News ist täglich um 
8:30 Uhr. Es werden vorrangig Informationen berücksichtigt, die nach 
16:00 Uhr des Vortages eingegangen sind. Die Email-Adresse unserer 
Redaktion lautet redaktion@thomas-daily.de.


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


Re: Convenience

Posted by Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>.
Yeah, I agree.. Leaving it at chaining are probably best fit..

Martijn Dashorst wrote:
> While I like the language, I think it is a wrong path, because the
> number of methods would explode:
>
> new TextField().setRequired().setInvisible().isDisabled();
>
> For each setFoo action you would get a setNotFoo action, and
> corresponding isNotFoo query.
>
> Martijn
>
> On Tue, Aug 26, 2008 at 11:40 AM, Jan Kriesten
> <ja...@renitence.de> wrote:
>   
>> Hi Uwe,
>>
>>     
>>> new TextField(..).setRequired().setVisible().setEnabled()
>>> instead of having to
>>> new TextField(..).setRequired(true).setVisible(true).setEnabled(true)
>>>
>>> what do you think ?
>>>       
>> naaaaah - you're just lazy. ;-) Not more convenience-methods, there are already
>> too many...
>>
>> Best regards, --- Jan.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>     
>
>
>
>   

-- 
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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


Re: Convenience

Posted by Martijn Dashorst <ma...@gmail.com>.
While I like the language, I think it is a wrong path, because the
number of methods would explode:

new TextField().setRequired().setInvisible().isDisabled();

For each setFoo action you would get a setNotFoo action, and
corresponding isNotFoo query.

Martijn

On Tue, Aug 26, 2008 at 11:40 AM, Jan Kriesten
<ja...@renitence.de> wrote:
>
> Hi Uwe,
>
>> new TextField(..).setRequired().setVisible().setEnabled()
>> instead of having to
>> new TextField(..).setRequired(true).setVisible(true).setEnabled(true)
>>
>> what do you think ?
>
> naaaaah - you're just lazy. ;-) Not more convenience-methods, there are already
> too many...
>
> Best regards, --- Jan.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.4 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

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


Re: Convenience

Posted by Uwe Schäfer <sc...@thomas-daily.de>.
Jan Kriesten schrieb:

> naaaaah - you're just lazy. ;-) 

i thought it was a good thing. ;)

 > Not more convenience-methods, there are already
> too many...

good point, in a way...

cu uwe

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


Re: Convenience

Posted by Jan Kriesten <ja...@renitence.de>.
Hi Uwe,

> new TextField(..).setRequired().setVisible().setEnabled()
> instead of having to
> new TextField(..).setRequired(true).setVisible(true).setEnabled(true)
> 
> what do you think ?

naaaaah - you're just lazy. ;-) Not more convenience-methods, there are already
too many...

Best regards, --- Jan.


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