public class InputMaskRenderer extends InputRenderer
Constructor and Description |
---|
InputMaskRenderer() |
Modifier and Type | Method and Description |
---|---|
void |
decode(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component) |
void |
encodeEnd(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component) |
protected void |
encodeMarkup(javax.faces.context.FacesContext context,
InputMask inputMask) |
protected void |
encodeScript(javax.faces.context.FacesContext context,
InputMask inputMask) |
protected String |
translateMaskCharIntoRegex(char c,
boolean optional) |
protected Pattern |
translateMaskIntoRegex(javax.faces.context.FacesContext context,
String mask)
Translates the client side mask to to a
Pattern base on:
https://github.com/digitalBush/jquery.maskedinput
a - Represents an alpha character (A-Z,a-z)
9 - Represents a numeric character (0-9)
* - Represents an alphanumeric character (A-Z,a-z,0-9)
? - Makes the following input optional |
getConvertedValue, isDisabled, isReadOnly, renderAccessibilityAttributes, renderAccessibilityAttributes, renderARIACombobox, renderARIAInvalid, renderARIARequired, renderRTLDirection, shouldDecode
buildAjaxRequest, buildAjaxRequest, buildAjaxRequest, buildDomEvent, buildNonAjaxRequest, buildNonAjaxRequest, decodeBehaviors, encodeClientBehaviors, escapeText, getEventBehaviors, getHighlighter, getResourceRequestPath, getResourceURL, getWidgetBuilder, isGrouped, isValueBlank, preConfiguredAjaxRequestBuilder, preConfiguredAjaxRequestBuilder, renderChild, renderChildren, renderDomEvent, renderDomEvents, renderDummyMarkup, renderDynamicPassThruAttributes, renderOnchange, renderOnclick, renderPassThruAttributes, renderPassThruAttributes, renderValidationMetadata, shouldRenderAttribute, shouldWriteId
public void decode(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
decode
in class javax.faces.render.Renderer
protected Pattern translateMaskIntoRegex(javax.faces.context.FacesContext context, String mask)
Pattern
base on:
https://github.com/digitalBush/jquery.maskedinput
a - Represents an alpha character (A-Z,a-z)
9 - Represents a numeric character (0-9)
* - Represents an alphanumeric character (A-Z,a-z,0-9)
? - Makes the following input optionalcontext
- The FacesContext
mask
- The mask value of componentPattern
protected String translateMaskCharIntoRegex(char c, boolean optional)
public void encodeEnd(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) throws IOException
encodeEnd
in class javax.faces.render.Renderer
IOException
protected void encodeScript(javax.faces.context.FacesContext context, InputMask inputMask) throws IOException
IOException
protected void encodeMarkup(javax.faces.context.FacesContext context, InputMask inputMask) throws IOException
IOException
Copyright © 2020. All rights reserved.