inheritance - tell wicket:link not to overwrite markup -
inheritance - tell wicket:link not to overwrite markup -
i'm working on svg-buttons user interface. have dynamically create link in java files code in markup. next code illustration of markup-input.
html-markup input:
<svg> <g> <wicket:link wicket:id="test"> <path ..../> <path ..../> </wicket:link> </g> </svg> i want markup-output this:
html-markup output:
<svg> <g> <a wicket:id="test" xlink:href="someurl"> <path ..../> <path ..../> </a> </g> </svg> the thing is, wicket end deleting path-instructions in markup html isn't supposed so. there way properly? testing came dirty work around i'm not satisfied because hurts wicket convention of not creating html in java. looks following:
html-markup dirty way input:
<svg> <g> <wicket:container wicket:id="linkbeginning"> <path ..../> <path ..../> <wicket:container wicket:id="linkending"> </g> </svg> java dirty-way:
add(new label("linkbeginning", "<a xlink:href =\""+linkurl+"\">"); add(new label("linkending", "</a>"); which ended in output:
<svg> <g> <a xlink:href="someurl"> <path ..../> <path ..../> </a> </g> </svg> i hope guys can help me!
why don't utilize regular link component anchor tag? ex:
<a wicket:id="link"> <div>link</div> <span>span</span> </a> and code
add(new link("link") { @override public void onclick() { } }); link component maintain internal markup body.
inheritance hyperlink wicket markup
Comments
Post a Comment