@Bruno: this is interesting question. You should ask it in scala-users@. I think this should be possible with some implicit declaration.
@Matthew: Do you use org.apache.wicket.markup.html.form.FormComponentLabel ? On Tue, Mar 29, 2011 at 11:29 AM, Matthew Pennington < [email protected]> wrote: > > I personally would suggest *not* having that second line >> "component.setMarkupId(component.getId())" there. Let Wicket generate the >> IDs for you so that they're all unique on a page. Your approach above >> breaks using two EmailAddressTextField (fake example class) components on >> the same page. >> >> Designers should use css class to style. An occasional ID that isn't >> attached to a Wicket component can also help (div surrounding content >> section, etc). >> > The only problem with this argument is that ID fields are a part of the > HTML syntax, via the "for" attribute of a html label... > > I've only recently started using wicket and I think it's *fantastic* but > the only thing I don't like is the way it changes the ID value of elements. > I'm sure it's necessary for the way Wicket works and I'm sure it's an issue > that's been discussed by wicket people before, but it came as a pretty nasty > surprise to me when I discovered it half way through writing my first > application (it doesn't seem to me to be very well flagged up for such a > major issue). > > Obviously I'm a newb, but the the only solution I am aware of to the > problem is to rewrite every label on every form as a wicket component. That > seems to run against the wicket philosophy of keeping the html and the code > separate. > > I realize nothing in life is perfect, but so far it's the *only* thing > about wicket that *isn't* perfect... :) > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com <http://jweekend.com/>
