- java.lang.Object
-
- jakarta.faces.render.Renderer
-
- org.omnifaces.renderer.CriticalStylesheetRenderer
-
public class CriticalStylesheetRenderer extends Renderer
This renderer is the default renderer ofCriticalStylesheet.- Since:
- 4.5
- 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 CriticalStylesheetRenderer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidencodeBegin(FacesContext context, UIComponent component)Writes a<link rel="preload" as="style">element with ahrefattribute representingResource.getRequestPath().voidencodeEnd(FacesContext context, UIComponent component)Ends the<link>and writes a<noscript>with a "plain vanilla"<link rel="stylesheet">-
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<link rel="preload" as="style">element with ahrefattribute representingResource.getRequestPath(). If the resource is not resolvable, then aRES_NOT_FOUNDwill be written to thehrefattribute instead.- Overrides:
encodeBeginin classRenderer- Throws:
IOException
-
encodeEnd
public void encodeEnd(FacesContext context, UIComponent component) throws IOException
Ends the<link>and writes a<noscript>with a "plain vanilla"<link rel="stylesheet">- Overrides:
encodeEndin classRenderer- Throws:
IOException
-
-