Resource getScript(IComponent component)
{
if (IWidget.class.isInstance(component)) {
if (_widgetResource == null)
_widgetResource = new ClasspathResource(_resolver, _widgetScript);
return _widgetResource;
}
if (Body.class.isInstance(component)) {
if (_elementResource == null)
_elementResource = new ClasspathResource(_resolver, _elementScript);
return _elementResource;
}
if (_componentResource == null)
_componentResource = new ClasspathResource(_resolver, _componentScript);
return _componentResource;
}