i see, try the following:
WebComponent comp = new WebComponent("locNode");
comp.add(new AttributeModifier("url", true, new Model("mylocation.com"));
add(comp);
with the markup eg. <loc wicket:id="url" />
that should work
Milan Křápek wrote:
>
> Thanks,
> the XML code is fine, but I need to know how to do it in the .java file.
> It seems you just use Labels that fill the value of each node. But my
> problem is little bit different. What I want is to be able do set there
> some attribute.
>
> You have in your XML code:
>
> <loc wicket:id="locNode">my.location.com</loc>
>
> but I need
>
> <loc url="my.location.com"/>
>
> And this I have givven by DTD so I cannot have there any wicket:id. And I
> need to pass the value to attribute and not as text value in the <loc>
> element.
>
> So I think I cannot use your method :o(
>
> Best regards
>
> Milan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
-----
Michael Sparer
http://talk-on-tech.blogspot.com
--
View this message in context:
http://www.nabble.com/wicket-xml---add-label-as-xml-element-atribute-tp17253179p17254329.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]