Q: An applet tag does not get its archive attribute value resolved in
the output HTML in the same way
as img src attributes. How can I fix this?
A: See
org.apache.wicket.markup.parser.filter.RelativePathPrefixHandler
This currently only supports the attributes "href", "src",
"background".
Solution: Add applet tag as WebMarkupContainer with behavior to
rewrite the attribute.
WebMarkupContainer clockContainer = new
WebMarkupContainer("clock");
clockContainer.add(new AbstractBehavior() {
private static final long serialVersionUID = 1L;
@Override
public void onComponentTag(Component component,
ComponentTag tag)
{
// Modify the relevant attribute
String attrName = "archive";
IValueMap valueMap = tag.getAttributes();
String attrValue = valueMap.getString(attrName);
// We don't need the generalised checking as in
//
org.apache.wicket.markup.parser.filter.RelativePathPrefixHandler:
//if ((attrValue != null) &&
(attrValue.startsWith("/") == false) &&
// (attrValue.indexOf(":") < 0) &&
!(attrValue.startsWith("#")))
if(attrValue != null){
IRequestCodingStrategy coder = RequestCycle.get()
.getProcessor()
.getRequestCodingStrategy();
valueMap.put(attrName,
coder.rewriteStaticRelativeUrl(attrValue));
}// if
}
});
add(clockContainer);
On Wed, 9 Dec 2009 21:53:51 +0600, you wrote:
>I need to know how to set-up a simple hello world applet to Wicket , i have
>almost browsed the entire web, and clueless of how to find it .. can some
>one please help me out... or point me to a relevant site ..
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]