- java.lang.Object
-
- jakarta.faces.render.Renderer
-
- org.omnifaces.renderer.DeferredScriptRenderer
-
public class DeferredScriptRenderer extends Renderer
This renderer is the default renderer ofDeferredScript. The rendering is extracted from the component so that it can be reused byCombinedResourceHandler.- Since:
- 1.8
- Author:
- Bauke Scholtz
-
-
Field Summary
Fields Modifier and Type Field Description static StringRENDERER_TYPEThe standard renderer type.-
Fields inherited from class jakarta.faces.render.Renderer
PASSTHROUGH_RENDERER_LOCALNAME_KEY
-
-
Constructor Summary
Constructors Constructor Description DeferredScriptRenderer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidencodeBegin(FacesContext context, UIComponent component)Writes a<script>element which callsOmniFaces.DeferredScript.addwith as arguments the script URL and, if any, the onbegin, onsuccess and/or onerror callbacks.voidencodeEnd(FacesContext context, UIComponent component)-
Methods inherited from class jakarta.faces.render.Renderer
convertClientId, decode, encodeChildren, getConvertedValue, getRendersChildren
-
-
-
-
Field Detail
-
RENDERER_TYPE
public static final String RENDERER_TYPE
The standard renderer type.- See Also:
- Constant Field Values
-
-
Method Detail
-
encodeBegin
public void encodeBegin(FacesContext context, UIComponent component) throws IOException
Writes a<script>element which callsOmniFaces.DeferredScript.addwith as arguments the script URL and, if any, the onbegin, onsuccess and/or onerror callbacks. If the script resource is not resolvable, then aRES_NOT_FOUNDwill be written tosrcattribute instead.- Overrides:
encodeBeginin classRenderer- Throws:
IOException
-
encodeEnd
public void encodeEnd(FacesContext context, UIComponent component) throws IOException
- Overrides:
encodeEndin classRenderer- Throws:
IOException
-
-