On 30/03/2011 19:44, Martin Grigorov wrote:
@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 ?
Going through the app and changing all the non-functioning plain html form labels to wicket FormComponentLabels is on my job list to do before it's finished!

So yeah, I'm aware of it, but while that component helps reduce the coding burden it still means that every single form component now needs a second wicket component creating and adding to the form *just to make the html work the way you would expect it to work.* That is tedious and it's additional plumbing code just for the sake of "making things work" so it strikes me as inherently undesirable. Wicket is fantastic at keeping code out of the html, it just seems to fly in the face of that ethos that it then forces me to write the html labels in the code.

Given that at some point in the processing cycle Wicket must be setting the ID of the form component labels, it seems a shame that it can't also detect any label that has a for attribute for the id it's altering and update the for attribute as well. I'm sure there are many good reasons why that wouldn't work but to my inexperienced mind it's a real pity! You'd still have the gotcha of discovering that Wicket was changing your ID values, but you'd never have to worry about keeping their attendant HTML labels in sync because Wicket could just do that for you?

Matt


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to