[Html-widget] Patch to fix RadioGroup implicit In Constraint for value or label == 0
Carl Franks
fireartist at gmail.com
Thu May 18 16:44:13 CEST 2006
On 18/05/06, Sebastian Riedel <sri at oook.de> wrote:
>
> Hmm, i thought we agreed to remove the implicit constraints from
> default elements?
I know, but I still haven't decided the best way to do that, so I
thought it best to apply the patch in the meantime.
The auto-constraint is also something I'm thinking of with the work
I'm doing on the Dojo extension.
I think it'll need to be a method on the $element, as the 'magic'
constraints will generally need access the the relevant element,
rather than just the element's name.
What about something along the lines of:
$w->element( 'Select', 'foo' )->options( @foo )->auto_constraint( 'In' );
which uses HTML::Widget::AutoConstraint::Select::In
which is a sub-class of HTML::Widget::Constraint::In and knows how to
handle a Select element
And then there could be a HTML::Widget::AutoConstraint::RadioGroup::In
sane ?
More information about the Html-widget
mailing list