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
-
Field Summary
Fields inherited from class javax.faces.render.Renderer
PASSTHROUGH_RENDERER_LOCALNAME_KEY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected 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 classprotected 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 classgetConvertedValue
(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, Object submittedValue) protected boolean
isDisabled
(javax.faces.component.UIInput component) protected boolean
isReadOnly
(javax.faces.component.UIInput component) protected void
renderAccessibilityAttributes
(javax.faces.context.FacesContext context, javax.faces.component.UIInput component) Adds the following accessibility attributes to an HTML DOM element.protected void
renderAccessibilityAttributes
(javax.faces.context.FacesContext context, javax.faces.component.UIInput component, boolean disabled, boolean readonly) protected void
renderAccessibilityAttributesHidden
(javax.faces.context.FacesContext context, javax.faces.component.UIInput component) Inputs of type="hidden" according to WCAG accessibility criterion 4.1.1 should not ever use readonly or aria-readonly attributes.protected void
renderARIACombobox
(javax.faces.context.FacesContext context, javax.faces.component.UIInput component) Adds ARIA attributes if the component is "role=combobox".protected void
renderARIAInvalid
(javax.faces.context.FacesContext context, javax.faces.component.UIInput component) Adds "aria-invalid" if the component is invalid.protected void
renderARIARequired
(javax.faces.context.FacesContext context, javax.faces.component.UIInput component) Adds "aria-required" if the component is required.protected boolean
shouldDecode
(javax.faces.component.UIInput component) Methods inherited from class org.primefaces.renderkit.CoreRenderer
buildAjaxRequest, buildAjaxRequest, buildAjaxRequest, buildDomEvent, buildNonAjaxRequest, buildNonAjaxRequest, decodeBehaviors, encodeClientBehaviors, encodeIndexedId, endsWithLenghtUnit, getEventBehaviors, getHighlighter, getIconOnlyButtonText, getResourceRequestPath, getResourceURL, getStyleBuilder, getStyleClassBuilder, getWidgetBuilder, isGrouped, isValueBlank, logDevelopmentWarning, preConfiguredAjaxRequestBuilder, preConfiguredAjaxRequestBuilder, renderAttribute, renderButtonValue, renderChild, renderChildren, renderDomEvent, renderDomEvents, renderDummyMarkup, renderDynamicPassThruAttributes, renderHiddenInput, renderOnchange, renderOnclick, renderPassThruAttributes, renderPassThruAttributes, renderPassThruAttributes, renderRTLDirection, renderValidationMetadata, shouldRenderAttribute, shouldWriteId
Methods inherited from class javax.faces.render.Renderer
convertClientId, decode, encodeBegin, encodeChildren, encodeEnd, getRendersChildren
-
Constructor Details
-
InputRenderer
public InputRenderer()
-
-
Method Details
-
getConvertedValue
public Object getConvertedValue(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, Object submittedValue) throws javax.faces.convert.ConverterException - Overrides:
getConvertedValue
in 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) -
renderARIARequired
protected void renderARIARequired(javax.faces.context.FacesContext context, javax.faces.component.UIInput component) throws IOException Adds "aria-required" if the component is required.- Parameters:
context
- theFacesContext
component
- theUIInput
component 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 IOException Adds "aria-invalid" if the component is invalid.- Parameters:
context
- theFacesContext
component
- theUIInput
component 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 IOException Adds 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
- theFacesContext
component
- theUIInput
component to add attributes for- Throws:
IOException
- if any error occurs writing the response
-
renderAccessibilityAttributesHidden
protected void renderAccessibilityAttributesHidden(javax.faces.context.FacesContext context, javax.faces.component.UIInput component) throws IOException Inputs of type="hidden" according to WCAG accessibility criterion 4.1.1 should not ever use readonly or aria-readonly attributes."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
- Parameters:
context
- theFacesContext
component
- theUIInput
component 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 IOException Adds ARIA attributes if the component is "role=combobox".- Parameters:
context
- theFacesContext
component
- theUIInput
component to add attributes for- Throws:
IOException
- if any error occurs writing the response- See Also:
-
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
- theUIInput
component 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
- theUIInput
component to construct styleClass forstyleClassProperty
- eg "styleClass" or "inputStyleClass"defaultStyleClass
- the default style for the component if any- Returns:
- the properly constructed style class string
-