I am sure I am doing something very silly here but ....
When I add the following AttributeModifier in my onBeforeRender() method,
the solution works as expected (so I load an image that indicates that this
page is selected)
icon.add(new AttributeModifier("this.src='", null, true, new
Model(urlFor(active)+"';")));
However, when I abstract that same code into a private class, the solution
still works and the correct image loads that indicates which page I am on,
but the browser, never completes the request (so the spinning wheel on the
tab keeps on spinning).
icon.add(new ActivateImage("onload", active));
.....
private class ActivateImage extends AttributeModifier {
private ActivateImage(String id, final ResourceReference ref) {
super(id, null, true, new Model("this.src='" + urlFor(ref) +
"';"));
}
}
Any ideas?
Thanks,
Pieter