Hi all,
there is a problem with the
ScriptGenerator.encodeResources method, because the
relative path written only works with jsp's that are in
the root context.
This is your code:
private void encodeResources(ResponseWriter writer)
throws IOException {
encodeStyleClasses(writer);
writer.write("<SCRIPT language=\"JavaScript1.2\"
SRC=\"faces/"+ClientValidatorsConstants.VALIDATOR_RESOURCE_VIEW_ID+"?name=clientvalidators&type=js\"></SCRIPT>\n");
}
and this is our code:
private void encodeResources(ResponseWriter writer)
throws IOException {
encodeStyleClasses(writer);
writer.write("<SCRIPT language=\"JavaScript1.2\"
SRC=\"") ;
writer.write(FacesContext.getCurrentInstance().getExternalContext().encodeResourceURL(FacesContext.getCurrentInstance().getExternalContext().getRequestContextPath()
+
"/faces/"+ClientValidatorsConstants.VALIDATOR_RESOURCE_VIEW_ID))
;
writer.write("?name=clientvalidators&type=js\"></SCRIPT>\n");
}
I send you the source file