IResourceLocation scriptLocation =
getSpecification().getSpecificationLocation().getRelativeLocation(
"InspectorButton.script");
IScript script = source.getScript(scriptLocation);
Map symbols = new HashMap();
IEngineService service = engine.getService(Tapestry.DIRECT_SERVICE);
ILink link = service.getLink(cycle, this, null);
symbols.put("URL", link.getURL());
Body body = Body.get(cycle);
if (body == null)
throw new ApplicationRuntimeException(
Tapestry.getMessage("InspectorButton.must-be-contained-by-body"),
this,
null,
null);
script.execute(cycle, body, symbols);
// Now, go render the rest from the template.
super.renderComponent(writer, cycle);
}