Feature Requests item #1445133, was opened at 2006-03-07 13:33
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=684978&aid=1445133&group_id=119783

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: core
Group: 1.2
Status: Open
Priority: 5
Submitted By: Jonathan Locke (jonathanlocke)
Assigned to: Nobody/Anonymous (nobody)
Summary: add convenience subclasses of textfield to wicket-extensions

Initial Comment:
i was just thinking that validators and converters are
just a little hard to grasp for users given that they
just want to do something really simple.

what if we stick with our plan, but then add these
convenience classes to wicket-extensions?

IntegerField(String id)
IntegerField(String id, int min, int max)
IntegerField(String id, IModel model)
IntegerField(String id, IModel model, int min, int max)

// Same for DoubleField

PatternField(String id, String pattern)
PatternField(String id, IModel model, String pattern)

StringField(String id, int max)
StringField(String id, IModel model, int max)

RequiredStringField(String id, int max)
RequiredStringField(String id, IModel model, int max)

they just do a setType() via super(id, class) and then
add the right validator.
would reduce the amount of work people have to do for
these common cases.
in fact, for the vast majority of applications, you
wouldn't even have to understand
how to use validators in the first place.

also, since the type is known in the subclass, we could
add a getValue()
method that gets the model as the right type.  a nice
convenience.
in 2.0, getValue() could be parameterized on the model
type. 

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=684978&aid=1445133&group_id=119783


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop

Reply via email to