Package org.primefaces.renderkit
Class InputRenderer
- java.lang.Object
-
- javax.faces.render.Renderer
-
- org.primefaces.renderkit.CoreRenderer
-
- org.primefaces.renderkit.InputRenderer
-
- Direct Known Subclasses:
AutoCompleteRenderer,BaseCalendarRenderer,CheckboxRenderer,ChipsRenderer,ColorPickerRenderer,InputMaskRenderer,InputNumberRenderer,InputSwitchRenderer,InputTextareaRenderer,InputTextRenderer,KeyboardRenderer,PasswordRenderer,PickListRenderer,RadioButtonRenderer,RatingRenderer,SelectBooleanButtonRenderer,SelectBooleanCheckboxRenderer,SelectRenderer,SignatureRenderer,SpinnerRenderer,TextEditorRenderer,ToggleSwitchRenderer,TriStateCheckboxRenderer
public abstract class InputRenderer extends CoreRenderer
-
-
Field Summary
Fields Modifier and Type Field Description static StringARIA_FILTER
-
Constructor Summary
Constructors Constructor Description InputRenderer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringcreateStyleClass(javax.faces.component.UIInput component, String defaultStyleClass)Creates a styleClass for the component which consists of: 1) default style class 2) Error State 3) Disabled State 4) user style classprotected StringcreateStyleClass(javax.faces.component.UIInput component, String styleClassProperty, String defaultStyleClass)Creates a styleClass for the component which consists of: 1) default style class 2) Error State 3) Disabled State 4) user style classObjectgetConvertedValue(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, Object submittedValue)protected booleanisDisabled(javax.faces.component.UIInput component)protected booleanisReadOnly(javax.faces.component.UIInput component)protected voidrenderAccessibilityAttributes(javax.faces.context.FacesContext context, javax.faces.component.UIInput component)Adds the following accessibility attributes to an HTML DOM element.protected voidrenderAccessibilityAttributes(javax.faces.context.FacesContext context, javax.faces.component.UIInput component, boolean disabled, boolean readonly)protected voidrenderARIACombobox(javax.faces.context.FacesContext context, javax.faces.component.UIInput component)Adds ARIA attributes if the component is "role=combobox".protected voidrenderARIAInvalid(javax.faces.context.FacesContext context, javax.faces.component.UIInput component)Adds "aria-invalid" if the component is invalid.protected voidrenderARIARequired(javax.faces.context.FacesContext context, javax.faces.component.UIInput component)Adds "aria-required" if the component is required.<T extends javax.faces.component.UIComponent & RTLAware>
voidrenderRTLDirection(javax.faces.context.FacesContext context, T component)protected booleanshouldDecode(javax.faces.component.UIInput component)-
Methods inherited from class org.primefaces.renderkit.CoreRenderer
buildAjaxRequest, buildAjaxRequest, buildAjaxRequest, buildDomEvent, buildNonAjaxRequest, buildNonAjaxRequest, decodeBehaviors, encodeClientBehaviors, endsWithLenghtUnit, getEventBehaviors, getHighlighter, getResourceRequestPath, getResourceURL, getStyleClassBuilder, getWidgetBuilder, isGrouped, isValueBlank, preConfiguredAjaxRequestBuilder, preConfiguredAjaxRequestBuilder, renderChild, renderChildren, renderDomEvent, renderDomEvents, renderDummyMarkup, renderDynamicPassThruAttributes, renderOnchange, renderOnclick, renderPassThruAttributes, renderPassThruAttributes, renderPassThruAttributes, renderValidationMetadata, shouldRenderAttribute, shouldWriteId
-
-
-
-
Field Detail
-
ARIA_FILTER
public static final String ARIA_FILTER
- See Also:
- Constant Field Values
-
-
Method Detail
-
getConvertedValue
public Object getConvertedValue(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, Object submittedValue) throws javax.faces.convert.ConverterException
- Overrides:
getConvertedValuein classjavax.faces.render.Renderer- Throws:
javax.faces.convert.ConverterException
-
isDisabled
protected boolean isDisabled(javax.faces.component.UIInput component)
-
isReadOnly
protected boolean isReadOnly(javax.faces.component.UIInput component)
-
shouldDecode
protected boolean shouldDecode(javax.faces.component.UIInput component)
-
renderRTLDirection
public <T extends javax.faces.component.UIComponent & RTLAware> void renderRTLDirection(javax.faces.context.FacesContext context, T component) throws IOException
- Throws:
IOException
-
renderARIARequired
protected void renderARIARequired(javax.faces.context.FacesContext context, javax.faces.component.UIInput component) throws IOExceptionAdds "aria-required" if the component is required.- Parameters:
context- theFacesContextcomponent- theUIInputcomponent to add attributes for- Throws:
IOException- if any error occurs writing the response
-
renderARIAInvalid
protected void renderARIAInvalid(javax.faces.context.FacesContext context, javax.faces.component.UIInput component) throws IOExceptionAdds "aria-invalid" if the component is invalid.- Parameters:
context- theFacesContextcomponent- theUIInputcomponent to add attributes for- Throws:
IOException- if any error occurs writing the response
-
renderAccessibilityAttributes
protected void renderAccessibilityAttributes(javax.faces.context.FacesContext context, javax.faces.component.UIInput component) throws IOExceptionAdds the following accessibility attributes to an HTML DOM element."aria-required" if the component is required "aria-invalid" if the component is invalid "aria-labelledby" if the component has a labelledby attribute "disabled" and "aria-disabled" if the component is disabled "readonly" and "aria-readonly" if the component is readonly
- Parameters:
context- theFacesContextcomponent- theUIInputcomponent to add attributes for- Throws:
IOException- if any error occurs writing the response
-
renderAccessibilityAttributes
protected void renderAccessibilityAttributes(javax.faces.context.FacesContext context, javax.faces.component.UIInput component, boolean disabled, boolean readonly) throws IOException- Throws:
IOException
-
renderARIACombobox
protected void renderARIACombobox(javax.faces.context.FacesContext context, javax.faces.component.UIInput component) throws IOExceptionAdds ARIA attributes if the component is "role=combobox".- Parameters:
context- theFacesContextcomponent- theUIInputcomponent to add attributes for- Throws:
IOException- if any error occurs writing the response- See Also:
- Combo Box
-
createStyleClass
protected String createStyleClass(javax.faces.component.UIInput component, String defaultStyleClass)
Creates a styleClass for the component which consists of: 1) default style class 2) Error State 3) Disabled State 4) user style class- Parameters:
component- theUIInputcomponent to construct styleClass fordefaultStyleClass- the default style for the component if any- Returns:
- the properly constructed style class string
-
createStyleClass
protected String createStyleClass(javax.faces.component.UIInput component, String styleClassProperty, String defaultStyleClass)
Creates a styleClass for the component which consists of: 1) default style class 2) Error State 3) Disabled State 4) user style class- Parameters:
component- theUIInputcomponent to construct styleClass forstyleClassProperty- eg "styleClass" or "inputStyleClass"defaultStyleClass- the default style for the component if any- Returns:
- the properly constructed style class string
-
-