Changed the "resourcePath" attribute to just "path".

This commit is contained in:
Jeremy Grelle
2008-04-11 14:55:50 +00:00
parent 2f51405ed5
commit ca3543ff66

View File

@@ -14,12 +14,11 @@ public class ResourceRenderer extends Renderer {
private static final ResourceHelper resourceHelper = new ResourceHelper();
public void encodeEnd(FacesContext context, UIComponent component) throws IOException {
String resourcePath = (String) component.getAttributes().get("resourcePath");
Assert.hasText(resourcePath, "Resource component " + component.getClientId(context)
+ " is missing a resourcePath.");
String resourcePath = (String) component.getAttributes().get("path");
Assert.hasText(resourcePath, "Resource component " + component.getClientId(context) + " is missing a path.");
if (!resourcePath.startsWith("/")) {
resourcePath = "/" + resourcePath;
component.getAttributes().put("resourcePath", resourcePath);
component.getAttributes().put("path", resourcePath);
}
resourceHelper.renderResource(context, resourcePath);
}