I'm a fan
sabob wrote:
>
> Its been suggested before to add method chaining to Click controls.
>
> With Java5 support of Covariant return types, I'd like to revisit this
> feature. It would allow us to write the following:
>
> form.add(new TextField("name").required(true).width("200px"));
>
> instead of:
>
> TextField field = new TextField("name");
> field.setRequired(true);
> field.setWidth("200px");
> form.add(field);
>
>
> I think Field and Column would get the most benefit from such a change.
>
> Couple of issues are API bloat, which is why I'd like to limit this to
> only a couple of controls. The other issue is NPE but that shouldn't
> be a problem because a reference to the Control instance is always
> returned.
>
> Thoughts?
>
> bob
>
>
--
View this message in context:
http://n2.nabble.com/Method-chaining-revisited-tp3156429p3159580.html
Sent from the click-development mailing list archive at Nabble.com.