1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
org.apache.myfaces.component.html.util.StreamingAddResource{
...
/**
* Adds the given Javascript resource to the document header at the specified
* document positioy by supplying a resourcehandler instance.
* <p>
* Use this method to have full control about building the reference url
* to identify the resource and to customize how the resource is
* written to the response. In most cases, however, one of the convenience
* methods on this class can be used without requiring a custom ResourceHandler
* to be provided.
* <p>
* If the script has already been referenced, it's added only once.
* <p>
* Note that this method <i>queues</i> the javascript for insertion, and that
* the script is inserted into the buffered response by the ExtensionsFilter
* after the page is complete.
*/
public void addJavaScriptAtPosition(FacesContext context, ResourcePosition position,
ResourceHandler resourceHandler)
{
addJavaScriptAtPosition(context, position, resourceHandler, false);
}
...
/**
* Adds the given Style Sheet at the specified document position.
* If the style sheet has already been referenced, it's added only once.
*/
public void addStyleSheet(FacesContext context, ResourcePosition position,
Class myfacesCustomComponent, String resourceName)
{
addStyleSheet(context, position, new MyFacesResourceHandler(myfacesCustomComponent,
resourceName));
}
...
} |
Partager