I had run into the same situation even I setOutputMarkupId(true), the
setMarkupId just wouldn't work for me. What worked for me is
SimpleAttributeModifier. You may try:
description.add ( new SimpleAttributeModifier ("id", "myDescription"));
Martin Letendre wrote:
>
> I am usign this version of Wicket: 1.3.5
>
> 1- I would like to override an id for a TextArea programmatically
>
> <textarea wicket:id="description"
> id="toOverride"
> name="description"
> rows="10"
> cols="50" ></textarea>
>
>
> 2- In my java code I tried this method
>
> TextArea description = new TextArea("description");
> description.setMarkupId("myDescription");
> form.add(description);
> ....
>
> 3- But it's not setting anything... Here is the generated HTML
>
> <textarea cols="50" rows="10" wicket:id="description" name="description"
> id="toOverride"></textarea>
>
> :confused:
>
> Question: Is it possible to override the id programatically. Because it
> would be usefull in my integration between YUI and Wicket...
>
>
>
--
View this message in context:
http://www.nabble.com/Set-the-HTML-id-programmatically-tp20628692p22568696.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]