You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Martin Grigorov <mg...@apache.org> on 2013/05/02 22:45:47 UTC

FormComponent's label outputs markup attributes

Hi Igor,

I have a question about your entry in the roadmap for Wicket 7.0:
SimpleFormComponentLabel should output the "required" class just like
wicket:for

Why helper classes like SimpleFormComponentLabel and  AutoLabel should
render anything else than "for" attribute?  And maybe HTML5's "form".
http://www.w3.org/wiki/HTML/Elements/label#HTML_Attributes
https://developer.mozilla.org/en-US/docs/HTML/Element/label

"required", "disabled", etc. should be in FormComponent#onComponentTag

-- 
Martin Grigorov
Wicket Training & Consulting
http://jWeekend.com <http://jweekend.com/>

Re: FormComponent's label outputs markup attributes

Posted by Martin Grigorov <mg...@apache.org>.
OK.
I was confused that the classes are set on the form component tag in
AutoLabel. They are actually on the <label> itself.


On Fri, May 3, 2013 at 1:20 AM, Igor Vaynberg <ig...@gmail.com>wrote:

> because they need to be styled differently and as far as i know there
> is no cross-browser selector that lets you select a label connected to
> a form component that has some specific css class or attribute...
>
> -igor
>
> On Thu, May 2, 2013 at 1:45 PM, Martin Grigorov <mg...@apache.org>
> wrote:
> > Hi Igor,
> >
> > I have a question about your entry in the roadmap for Wicket 7.0:
> > SimpleFormComponentLabel should output the "required" class just like
> > wicket:for
> >
> > Why helper classes like SimpleFormComponentLabel and  AutoLabel should
> > render anything else than "for" attribute?  And maybe HTML5's "form".
> > http://www.w3.org/wiki/HTML/Elements/label#HTML_Attributes
> > https://developer.mozilla.org/en-US/docs/HTML/Element/label
> >
> > "required", "disabled", etc. should be in FormComponent#onComponentTag
> >
> > --
> > Martin Grigorov
> > Wicket Training & Consulting
> > http://jWeekend.com <http://jweekend.com/>
>



-- 
Martin Grigorov
Wicket Training & Consulting
http://jWeekend.com <http://jweekend.com/>

Re: FormComponent's label outputs markup attributes

Posted by Igor Vaynberg <ig...@gmail.com>.
because they need to be styled differently and as far as i know there
is no cross-browser selector that lets you select a label connected to
a form component that has some specific css class or attribute...

-igor

On Thu, May 2, 2013 at 1:45 PM, Martin Grigorov <mg...@apache.org> wrote:
> Hi Igor,
>
> I have a question about your entry in the roadmap for Wicket 7.0:
> SimpleFormComponentLabel should output the "required" class just like
> wicket:for
>
> Why helper classes like SimpleFormComponentLabel and  AutoLabel should
> render anything else than "for" attribute?  And maybe HTML5's "form".
> http://www.w3.org/wiki/HTML/Elements/label#HTML_Attributes
> https://developer.mozilla.org/en-US/docs/HTML/Element/label
>
> "required", "disabled", etc. should be in FormComponent#onComponentTag
>
> --
> Martin Grigorov
> Wicket Training & Consulting
> http://jWeekend.com <http://jweekend.com/>