public final class HtmlRendererUtils extends Object
Modifier and Type | Class and Description |
---|---|
static class |
HtmlRendererUtils.LinkParameter |
static class |
HtmlRendererUtils.ScriptContext
The ScriptContext offers methods and fields
to help with rendering out a script and keeping a
proper formatting.
|
Modifier and Type | Field and Description |
---|---|
static String |
ALLOW_CDATA_SECTION_ON |
static String |
CLEAR_HIDDEN_FIELD_FN_NAME |
static String |
DEFAULT_CHAR_ENCODING |
static String |
HIDDEN_COMMANDLINK_FIELD_NAME |
static String |
HIDDEN_COMMANDLINK_FIELD_NAME_MYFACES_OLD |
static String |
HIDDEN_COMMANDLINK_FIELD_NAME_TRINIDAD |
static String |
NON_SUBMITTED_VALUE_WARNING |
static String |
STR_EMPTY |
static String |
SUBMIT_FORM_FN_NAME |
static String |
SUBMIT_FORM_FN_NAME_JSF2 |
Modifier and Type | Method and Description |
---|---|
static void |
allowCdataSection(FacesContext fc,
boolean cdataSectionAllowed) |
static void |
appendAutoScrollAssignment(FacesContext context,
StringBuilder onClickValue,
String formName)
Adds the hidden form input value assignment that is necessary for the autoscroll
feature to an html link or button onclick attribute.
|
static void |
appendAutoScrollAssignment(StringBuilder onClickValue,
String formName)
Adds the hidden form input value assignment that is necessary for the autoscroll
feature to an html link or button onclick attribute.
|
static void |
appendClearHiddenCommandFormParamsFunctionCall(StringBuilder buf,
String formName) |
static String |
buildBehaviorChain(FacesContext facesContext,
UIComponent uiComponent,
String eventName,
Collection<ClientBehaviorContext.Parameter> params,
Map<String,List<ClientBehavior>> clientBehaviors,
String userEventCode,
String serverEventCode) |
static String |
buildBehaviorChain(FacesContext facesContext,
UIComponent uiComponent,
String eventName1,
Collection<ClientBehaviorContext.Parameter> params,
String eventName2,
Collection<ClientBehaviorContext.Parameter> params2,
Map<String,List<ClientBehavior>> clientBehaviors,
String userEventCode,
String serverEventCode) |
static String |
buildBehaviorChain(FacesContext facesContext,
UIComponent uiComponent,
String sourceId,
String eventName,
Collection<ClientBehaviorContext.Parameter> params,
Map<String,List<ClientBehavior>> clientBehaviors,
String userEventCode,
String serverEventCode) |
static String |
buildBehaviorChain(FacesContext facesContext,
UIComponent uiComponent,
String sourceId,
String eventName1,
Collection<ClientBehaviorContext.Parameter> params,
String eventName2,
Collection<ClientBehaviorContext.Parameter> params2,
Map<String,List<ClientBehavior>> clientBehaviors,
String userEventCode,
String serverEventCode) |
static void |
decodeClientBehaviors(FacesContext facesContext,
UIComponent component) |
static void |
decodeUIInput(FacesContext facesContext,
UIComponent component)
Utility to set the submitted value of the provided component from the
data in the current request object.
|
static void |
decodeUISelectBoolean(FacesContext facesContext,
UIComponent component)
X-CHECKED: tlddoc h:selectBooleanCheckbox
|
static void |
decodeUISelectMany(FacesContext facesContext,
UIComponent component)
X-CHECKED: tlddoc h:selectManyListbox
|
static void |
decodeUISelectOne(FacesContext facesContext,
UIComponent component)
X-CHECKED: tlddoc h:selectManyListbox
|
static String |
escapeJavaScriptForChain(String javaScript)
This function correctly escapes the given JavaScript code
for the use in the jsf.util.chain() JavaScript function.
|
static Converter |
findUIOutputConverterFailSafe(FacesContext facesContext,
UIComponent uiComponent) |
static Converter |
findUISelectManyConverterFailsafe(FacesContext facesContext,
UIComponent uiComponent) |
static Converter |
findUISelectManyConverterFailsafe(FacesContext facesContext,
UIComponent uiComponent,
boolean considerValueType) |
static String |
getAutoScrollFunction(FacesContext facesContext) |
static String |
getClearHiddenCommandFormParamsFunctionName(String formName)
Prefixes the given String with "clear_" and removes special characters
|
static String |
getClearHiddenCommandFormParamsFunctionNameMyfacesLegacy(String formName) |
static Collection<ClientBehaviorContext.Parameter> |
getClientBehaviorContextParameters(Map<String,String> params) |
static String |
getDisplayValueOnlyStyle(UIComponent component) |
static String |
getDisplayValueOnlyStyleClass(UIComponent component) |
static String |
getHiddenCommandLinkFieldName(FormInfo formInfo)
Get the name of the request parameter that holds the id of the
link-type component that caused the form to be submitted.
|
static String |
getHiddenCommandLinkFieldName(FormInfo formInfo,
FacesContext facesContext) |
static String |
getHiddenCommandLinkFieldNameMyfacesOld(FormInfo formInfo) |
static String |
getImageLocation(UIComponent component) |
static String |
getJavascriptLocation(UIComponent component) |
static String |
getOutcomeTargetHref(FacesContext facesContext,
UIOutcomeTarget component) |
static String |
getStyleLocation(UIComponent component) |
static Set |
getSubmittedOrSelectedValuesAsSet(boolean selectMany,
UIComponent uiComponent,
FacesContext facesContext,
Converter converter) |
static String[] |
getSupportedContentTypes() |
static List<UIParameter> |
getValidUIParameterChildren(FacesContext facesContext,
List<UIComponent> children,
boolean skipNullValue,
boolean skipUnrendered)
Calls getValidUIParameterChildren(facesContext, children, skipNullValue, skipUnrendered, true);
|
static List<UIParameter> |
getValidUIParameterChildren(FacesContext facesContext,
List<UIComponent> children,
boolean skipNullValue,
boolean skipUnrendered,
boolean skipNullName)
Returns a List of all valid UIParameter children from the given children.
|
static boolean |
hasClientBehavior(String eventName,
Map<String,List<ClientBehavior>> behaviors,
FacesContext facesContext)
Checks if the given component has a behavior attachment with a given name.
|
static boolean |
isAllowedCdataSection(FacesContext fc) |
static boolean |
isDisabled(UIComponent component) |
static boolean |
isDisabledOrReadOnly(UIComponent component) |
static boolean |
isDisplayValueOnly(UIComponent component) |
static boolean |
isHideNoSelectionOption(UIComponent component)
Returns the value of the hideNoSelectionOption attribute of the given UIComponent
|
static boolean |
isPartialOrBehaviorSubmit(FacesContext facesContext,
String clientId) |
static boolean |
isReadOnly(UIComponent component) |
static boolean |
isXHTMLContentType(String contentType) |
static Map<String,String> |
mapAttachedParamsToStringValues(FacesContext facesContext,
UIComponent uiComponent) |
static void |
renderAutoScrollFunction(FacesContext facesContext,
ResponseWriter writer)
Renders the autoscroll javascript function.
|
static void |
renderAutoScrollHiddenInput(FacesContext facesContext,
ResponseWriter writer)
Renders the hidden form input that is necessary for the autoscroll feature.
|
static boolean |
renderBehaviorizedAttribute(FacesContext facesContext,
ResponseWriter writer,
String componentProperty,
UIComponent component,
String eventName,
Collection<ClientBehaviorContext.Parameter> eventParameters,
Map<String,List<ClientBehavior>> clientBehaviors,
String htmlAttrName,
String attributeValue)
Render an attribute taking into account the passed event,
the component property and the passed attribute value for the component
property.
|
static boolean |
renderBehaviorizedAttribute(FacesContext facesContext,
ResponseWriter writer,
String componentProperty,
UIComponent component,
String eventName,
Collection<ClientBehaviorContext.Parameter> eventParameters,
Map<String,List<ClientBehavior>> clientBehaviors,
String htmlAttrName,
String attributeValue,
String serverSideScript)
Render an attribute taking into account the passed event,
the passed attribute value for the component property.
|
static boolean |
renderBehaviorizedAttribute(FacesContext facesContext,
ResponseWriter writer,
String componentProperty,
UIComponent component,
String eventName,
Collection<ClientBehaviorContext.Parameter> eventParameters,
String eventName2,
Collection<ClientBehaviorContext.Parameter> eventParameters2,
Map<String,List<ClientBehavior>> clientBehaviors,
String htmlAttrName,
String attributeValue,
String serverSideScript) |
static boolean |
renderBehaviorizedAttribute(FacesContext facesContext,
ResponseWriter writer,
String componentProperty,
UIComponent component,
String eventName,
Map<String,List<ClientBehavior>> clientBehaviors)
Render an attribute taking into account the passed event and
the component property.
|
static boolean |
renderBehaviorizedAttribute(FacesContext facesContext,
ResponseWriter writer,
String componentProperty,
UIComponent component,
String eventName,
Map<String,List<ClientBehavior>> clientBehaviors,
String htmlAttrName)
Render an attribute taking into account the passed event and
the component property.
|
static boolean |
renderBehaviorizedAttribute(FacesContext facesContext,
ResponseWriter writer,
String componentProperty,
UIComponent component,
String sourceId,
String eventName,
Collection<ClientBehaviorContext.Parameter> eventParameters,
Map<String,List<ClientBehavior>> clientBehaviors,
String htmlAttrName,
String attributeValue) |
static boolean |
renderBehaviorizedAttribute(FacesContext facesContext,
ResponseWriter writer,
String componentProperty,
UIComponent component,
String sourceId,
String eventName,
Collection<ClientBehaviorContext.Parameter> eventParameters,
Map<String,List<ClientBehavior>> clientBehaviors,
String htmlAttrName,
String attributeValue,
String serverSideScript) |
static boolean |
renderBehaviorizedAttribute(FacesContext facesContext,
ResponseWriter writer,
String componentProperty,
UIComponent component,
String sourceId,
String eventName,
Collection<ClientBehaviorContext.Parameter> eventParameters,
String eventName2,
Collection<ClientBehaviorContext.Parameter> eventParameters2,
Map<String,List<ClientBehavior>> clientBehaviors,
String htmlAttrName,
String attributeValue,
String serverSideScript) |
static boolean |
renderBehaviorizedAttribute(FacesContext facesContext,
ResponseWriter writer,
String componentProperty,
UIComponent component,
String sourceId,
String eventName,
Map<String,List<ClientBehavior>> clientBehaviors) |
static boolean |
renderBehaviorizedAttribute(FacesContext facesContext,
ResponseWriter writer,
String componentProperty,
UIComponent component,
String sourceId,
String eventName,
Map<String,List<ClientBehavior>> clientBehaviors,
String htmlAttrName) |
static void |
renderBehaviorizedEventHandlers(FacesContext facesContext,
ResponseWriter writer,
UIComponent uiComponent,
Map<String,List<ClientBehavior>> clientBehaviors) |
static void |
renderBehaviorizedEventHandlers(FacesContext facesContext,
ResponseWriter writer,
UIComponent uiComponent,
String sourceId,
Map<String,List<ClientBehavior>> clientBehaviors) |
static void |
renderBehaviorizedEventHandlersWithoutOnclick(FacesContext facesContext,
ResponseWriter writer,
UIComponent uiComponent,
Map<String,List<ClientBehavior>> clientBehaviors) |
static void |
renderBehaviorizedEventHandlersWithoutOnmouseoverAndOnmouseout(FacesContext facesContext,
ResponseWriter writer,
UIComponent uiComponent,
Map<String,List<ClientBehavior>> clientBehaviors) |
static void |
renderBehaviorizedFieldEventHandlers(FacesContext facesContext,
ResponseWriter writer,
UIComponent uiComponent,
Map<String,List<ClientBehavior>> clientBehaviors) |
static void |
renderBehaviorizedFieldEventHandlersWithoutOnchange(FacesContext facesContext,
ResponseWriter writer,
UIComponent uiComponent,
Map<String,List<ClientBehavior>> clientBehaviors) |
static void |
renderBehaviorizedFieldEventHandlersWithoutOnchange(FacesContext facesContext,
ResponseWriter writer,
UIComponent uiComponent,
String sourceId,
Map<String,List<ClientBehavior>> clientBehaviors) |
static void |
renderBehaviorizedFieldEventHandlersWithoutOnchangeAndOnselect(FacesContext facesContext,
ResponseWriter writer,
UIComponent uiComponent,
Map<String,List<ClientBehavior>> clientBehaviors) |
static void |
renderBehaviorizedFieldEventHandlersWithoutOnfocus(FacesContext facesContext,
ResponseWriter writer,
UIComponent uiComponent,
Map<String,List<ClientBehavior>> clientBehaviors) |
static boolean |
renderBehaviorizedOnchangeEventHandler(FacesContext facesContext,
ResponseWriter writer,
UIComponent uiComponent,
Map<String,List<ClientBehavior>> clientBehaviors) |
static boolean |
renderBehaviorizedOnchangeEventHandler(FacesContext facesContext,
ResponseWriter writer,
UIComponent uiComponent,
String sourceId,
Map<String,List<ClientBehavior>> clientBehaviors) |
static void |
renderClearHiddenCommandFormParamsFunction(ResponseWriter writer,
String formName,
Set dummyFormParams,
String formTarget)
Render the javascript function that is called on a click on a commandLink
to clear the hidden inputs.
|
static void |
renderDisplayValueOnly(FacesContext facesContext,
UIInput input) |
static void |
renderDisplayValueOnlyAttributes(UIComponent uiComponent,
ResponseWriter writer) |
static void |
renderDisplayValueOnlyForSelects(FacesContext facesContext,
UIComponent uiComponent) |
static void |
renderDisplayValueOnlyForSelects(FacesContext facesContext,
UIComponent uiComponent,
boolean considerValueType) |
static void |
renderFormSubmitScript(FacesContext facesContext) |
static void |
renderHiddenCommandFormParams(ResponseWriter writer,
Set dummyFormParams) |
static void |
renderHiddenInputField(ResponseWriter writer,
Object name,
Object value) |
static boolean |
renderHTMLAttribute(ResponseWriter writer,
String componentProperty,
String attrName,
Object value) |
static boolean |
renderHTMLAttribute(ResponseWriter writer,
UIComponent component,
String componentProperty,
String htmlAttrName) |
static boolean |
renderHTMLAttributes(ResponseWriter writer,
UIComponent component,
String[] attributes) |
static boolean |
renderHTMLAttributesWithOptionalStartElement(ResponseWriter writer,
UIComponent component,
String elementName,
String[] attributes) |
static boolean |
renderHTMLAttributeWithOptionalStartElement(ResponseWriter writer,
UIComponent component,
String elementName,
String attrName,
Object value,
boolean startElementWritten) |
static boolean |
renderHTMLStringAttribute(ResponseWriter writer,
String componentProperty,
String htmlAttrName,
String value)
Renders a html string type attribute.
|
static boolean |
renderHTMLStringAttribute(ResponseWriter writer,
UIComponent component,
String componentProperty,
String htmlAttrName)
Renders a html string type attribute.
|
static boolean |
renderHTMLStringNoStyleAttributes(ResponseWriter writer,
UIComponent component,
String[] attributes) |
static boolean |
renderHTMLStringPreserveEmptyAttribute(ResponseWriter writer,
String componentProperty,
String htmlAttrName,
String value)
Renders a html string type attribute.
|
static boolean |
renderHTMLStringPreserveEmptyAttribute(ResponseWriter writer,
UIComponent component,
String componentProperty,
String htmlAttrName)
Renders a html string type attribute.
|
static void |
renderLabel(ResponseWriter writer,
UIComponent component,
String forClientId,
SelectItem item,
boolean disabled)
Renders a label HTML element
|
static void |
renderLabel(ResponseWriter writer,
UIComponent component,
String forClientId,
SelectItem item,
boolean disabled,
boolean selected)
Renders a label HTML element
|
static void |
renderLabel(ResponseWriter writer,
UIComponent component,
String forClientId,
String labelValue,
boolean disabled)
Deprecated.
Replaced by
renderLabel(ResponseWriter writer,
UIComponent component,
String forClientId,
SelectItem item,
boolean disabled).
Renders a label HTML element
|
static void |
renderListbox(FacesContext facesContext,
UISelectMany selectMany,
boolean disabled,
int size,
Converter converter) |
static void |
renderListbox(FacesContext facesContext,
UISelectOne selectOne,
boolean disabled,
int size,
Converter converter) |
static void |
renderMenu(FacesContext facesContext,
UISelectMany selectMany,
boolean disabled,
Converter converter) |
static void |
renderMenu(FacesContext facesContext,
UISelectOne selectOne,
boolean disabled,
Converter converter) |
static boolean |
renderOptionalEndElement(ResponseWriter writer,
UIComponent component,
String elementName,
String[] attributes) |
static void |
renderSelectOptions(FacesContext context,
UIComponent component,
Converter converter,
Set lookupSet,
List selectItemList)
Renders the select options for a
UIComponent that is
rendered as an HTML select element. |
static void |
renderTableCaption(FacesContext context,
ResponseWriter writer,
UIComponent component) |
static void |
renderUnhandledFacesMessages(FacesContext facesContext)
Renders all FacesMessages which have not been rendered yet with
the help of a HtmlMessages component.
|
static String |
selectContentType(String contentTypeListString)
Deprecated.
use ContentTypeUtils instead
|
static void |
writeIdAndName(ResponseWriter writer,
UIComponent component,
FacesContext facesContext) |
static void |
writeIdAndNameIfNecessary(ResponseWriter writer,
UIComponent component,
FacesContext facesContext) |
static void |
writeIdIfNecessary(ResponseWriter writer,
UIComponent component,
FacesContext facesContext) |
public static final String HIDDEN_COMMANDLINK_FIELD_NAME
public static final String HIDDEN_COMMANDLINK_FIELD_NAME_MYFACES_OLD
public static final String HIDDEN_COMMANDLINK_FIELD_NAME_TRINIDAD
public static final String CLEAR_HIDDEN_FIELD_FN_NAME
public static final String SUBMIT_FORM_FN_NAME
public static final String SUBMIT_FORM_FN_NAME_JSF2
public static final String ALLOW_CDATA_SECTION_ON
public static final String NON_SUBMITTED_VALUE_WARNING
public static final String STR_EMPTY
public static final String DEFAULT_CHAR_ENCODING
public static void decodeUIInput(FacesContext facesContext, UIComponent component)
public static void decodeUISelectBoolean(FacesContext facesContext, UIComponent component)
facesContext
- component
- public static boolean isDisabledOrReadOnly(UIComponent component)
public static boolean isDisabled(UIComponent component)
public static boolean isReadOnly(UIComponent component)
public static void decodeUISelectMany(FacesContext facesContext, UIComponent component)
facesContext
- component
- public static void decodeUISelectOne(FacesContext facesContext, UIComponent component)
facesContext
- component
- public static void decodeClientBehaviors(FacesContext facesContext, UIComponent component)
public static void renderListbox(FacesContext facesContext, UISelectOne selectOne, boolean disabled, int size, Converter converter) throws IOException
IOException
public static void renderListbox(FacesContext facesContext, UISelectMany selectMany, boolean disabled, int size, Converter converter) throws IOException
IOException
public static void renderMenu(FacesContext facesContext, UISelectOne selectOne, boolean disabled, Converter converter) throws IOException
IOException
public static void renderMenu(FacesContext facesContext, UISelectMany selectMany, boolean disabled, Converter converter) throws IOException
IOException
public static Set getSubmittedOrSelectedValuesAsSet(boolean selectMany, UIComponent uiComponent, FacesContext facesContext, Converter converter)
public static Converter findUISelectManyConverterFailsafe(FacesContext facesContext, UIComponent uiComponent)
public static Converter findUISelectManyConverterFailsafe(FacesContext facesContext, UIComponent uiComponent, boolean considerValueType)
public static Converter findUIOutputConverterFailSafe(FacesContext facesContext, UIComponent uiComponent)
public static void renderSelectOptions(FacesContext context, UIComponent component, Converter converter, Set lookupSet, List selectItemList) throws IOException
UIComponent
that is
rendered as an HTML select element.context
- the current FacesContext
.component
- the UIComponent
whose options need to be
rendered.converter
- component
's converterlookupSet
- the Set
to use to look up selected optionsselectItemList
- the List
of SelectItem
s to be
rendered as HTML option elements.IOException
public static boolean renderHTMLAttribute(ResponseWriter writer, String componentProperty, String attrName, Object value) throws IOException
IOException
public static boolean renderHTMLAttribute(ResponseWriter writer, UIComponent component, String componentProperty, String htmlAttrName) throws IOException
IOException
public static boolean renderHTMLAttributes(ResponseWriter writer, UIComponent component, String[] attributes) throws IOException
IOException
public static boolean renderHTMLAttributeWithOptionalStartElement(ResponseWriter writer, UIComponent component, String elementName, String attrName, Object value, boolean startElementWritten) throws IOException
IOException
public static boolean renderHTMLAttributesWithOptionalStartElement(ResponseWriter writer, UIComponent component, String elementName, String[] attributes) throws IOException
IOException
public static boolean renderOptionalEndElement(ResponseWriter writer, UIComponent component, String elementName, String[] attributes) throws IOException
IOException
public static void writeIdIfNecessary(ResponseWriter writer, UIComponent component, FacesContext facesContext) throws IOException
IOException
public static void writeIdAndNameIfNecessary(ResponseWriter writer, UIComponent component, FacesContext facesContext) throws IOException
IOException
public static final boolean renderHTMLStringPreserveEmptyAttribute(ResponseWriter writer, UIComponent component, String componentProperty, String htmlAttrName) throws IOException
writer
- component
- componentProperty
- htmlAttrName
- IOException
public static boolean renderHTMLStringPreserveEmptyAttribute(ResponseWriter writer, String componentProperty, String htmlAttrName, String value) throws IOException
writer
- component
- componentProperty
- htmlAttrName
- IOException
public static boolean renderHTMLStringAttribute(ResponseWriter writer, UIComponent component, String componentProperty, String htmlAttrName) throws IOException
writer
- component
- componentProperty
- htmlAttrName
- IOException
public static boolean renderHTMLStringAttribute(ResponseWriter writer, String componentProperty, String htmlAttrName, String value) throws IOException
writer
- componentProperty
- htmlAttrName
- value
- IOException
public static boolean renderHTMLStringNoStyleAttributes(ResponseWriter writer, UIComponent component, String[] attributes) throws IOException
IOException
public static void writeIdAndName(ResponseWriter writer, UIComponent component, FacesContext facesContext) throws IOException
IOException
public static void renderDisplayValueOnlyForSelects(FacesContext facesContext, UIComponent uiComponent) throws IOException
IOException
public static void renderDisplayValueOnlyForSelects(FacesContext facesContext, UIComponent uiComponent, boolean considerValueType) throws IOException
IOException
public static void renderDisplayValueOnlyAttributes(UIComponent uiComponent, ResponseWriter writer) throws IOException
IOException
public static void renderTableCaption(FacesContext context, ResponseWriter writer, UIComponent component) throws IOException
IOException
public static String getDisplayValueOnlyStyleClass(UIComponent component)
public static String getDisplayValueOnlyStyle(UIComponent component)
public static boolean isDisplayValueOnly(UIComponent component)
public static void renderDisplayValueOnly(FacesContext facesContext, UIInput input) throws IOException
IOException
public static void appendClearHiddenCommandFormParamsFunctionCall(StringBuilder buf, String formName)
public static void renderFormSubmitScript(FacesContext facesContext) throws IOException
IOException
public static void appendAutoScrollAssignment(StringBuilder onClickValue, String formName)
public static void appendAutoScrollAssignment(FacesContext context, StringBuilder onClickValue, String formName)
public static void renderAutoScrollHiddenInput(FacesContext facesContext, ResponseWriter writer) throws IOException
IOException
public static void renderAutoScrollFunction(FacesContext facesContext, ResponseWriter writer) throws IOException
IOException
public static String getAutoScrollFunction(FacesContext facesContext)
public static boolean isAllowedCdataSection(FacesContext fc)
public static void allowCdataSection(FacesContext fc, boolean cdataSectionAllowed)
public static void renderHiddenCommandFormParams(ResponseWriter writer, Set dummyFormParams) throws IOException
IOException
public static void renderHiddenInputField(ResponseWriter writer, Object name, Object value) throws IOException
IOException
@Deprecated public static void renderLabel(ResponseWriter writer, UIComponent component, String forClientId, String labelValue, boolean disabled) throws IOException
IOException
public static void renderLabel(ResponseWriter writer, UIComponent component, String forClientId, SelectItem item, boolean disabled) throws IOException
IOException
public static void renderLabel(ResponseWriter writer, UIComponent component, String forClientId, SelectItem item, boolean disabled, boolean selected) throws IOException
IOException
public static void renderClearHiddenCommandFormParamsFunction(ResponseWriter writer, String formName, Set dummyFormParams, String formTarget) throws IOException
writer
- formName
- dummyFormParams
- formTarget
- IOException
public static String getClearHiddenCommandFormParamsFunctionName(String formName)
formName
- public static String getClearHiddenCommandFormParamsFunctionNameMyfacesLegacy(String formName)
public static String getHiddenCommandLinkFieldName(FormInfo formInfo)
public static String getHiddenCommandLinkFieldName(FormInfo formInfo, FacesContext facesContext)
public static boolean isPartialOrBehaviorSubmit(FacesContext facesContext, String clientId)
public static String getHiddenCommandLinkFieldNameMyfacesOld(FormInfo formInfo)
public static String getOutcomeTargetHref(FacesContext facesContext, UIOutcomeTarget component) throws IOException
IOException
@Deprecated public static String selectContentType(String contentTypeListString)
public static String[] getSupportedContentTypes()
public static boolean isXHTMLContentType(String contentType)
public static String getJavascriptLocation(UIComponent component)
public static String getImageLocation(UIComponent component)
public static String getStyleLocation(UIComponent component)
public static boolean hasClientBehavior(String eventName, Map<String,List<ClientBehavior>> behaviors, FacesContext facesContext)
eventName
- the event name to be checked forbehaviors
- map of behaviors attached to the componentpublic static Collection<ClientBehaviorContext.Parameter> getClientBehaviorContextParameters(Map<String,String> params)
public static String buildBehaviorChain(FacesContext facesContext, UIComponent uiComponent, String eventName, Collection<ClientBehaviorContext.Parameter> params, Map<String,List<ClientBehavior>> clientBehaviors, String userEventCode, String serverEventCode)
public static String buildBehaviorChain(FacesContext facesContext, UIComponent uiComponent, String sourceId, String eventName, Collection<ClientBehaviorContext.Parameter> params, Map<String,List<ClientBehavior>> clientBehaviors, String userEventCode, String serverEventCode)
public static String buildBehaviorChain(FacesContext facesContext, UIComponent uiComponent, String eventName1, Collection<ClientBehaviorContext.Parameter> params, String eventName2, Collection<ClientBehaviorContext.Parameter> params2, Map<String,List<ClientBehavior>> clientBehaviors, String userEventCode, String serverEventCode)
facesContext
- uiComponent
- clientBehaviors
- eventName1
- eventName2
- userEventCode
- serverEventCode
- params
- public static String buildBehaviorChain(FacesContext facesContext, UIComponent uiComponent, String sourceId, String eventName1, Collection<ClientBehaviorContext.Parameter> params, String eventName2, Collection<ClientBehaviorContext.Parameter> params2, Map<String,List<ClientBehavior>> clientBehaviors, String userEventCode, String serverEventCode)
public static String escapeJavaScriptForChain(String javaScript)
javaScript
- public static Map<String,String> mapAttachedParamsToStringValues(FacesContext facesContext, UIComponent uiComponent)
public static List<UIParameter> getValidUIParameterChildren(FacesContext facesContext, List<UIComponent> children, boolean skipNullValue, boolean skipUnrendered)
facesContext
- children
- skipNullValue
- skipUnrendered
- public static List<UIParameter> getValidUIParameterChildren(FacesContext facesContext, List<UIComponent> children, boolean skipNullValue, boolean skipUnrendered, boolean skipNullName)
facesContext
- children
- skipNullValue
- should UIParameters with a null value be skippedskipUnrendered
- should UIParameters with isRendered() returning false be skippedskipNullName
- should UIParameters with a null name be skipped
(normally true, but in the case of h:outputFormat false)public static boolean renderBehaviorizedAttribute(FacesContext facesContext, ResponseWriter writer, String componentProperty, UIComponent component, String eventName, Map<String,List<ClientBehavior>> clientBehaviors) throws IOException
facesContext
- writer
- componentProperty
- component
- eventName
- clientBehaviors
- IOException
public static boolean renderBehaviorizedAttribute(FacesContext facesContext, ResponseWriter writer, String componentProperty, UIComponent component, String sourceId, String eventName, Map<String,List<ClientBehavior>> clientBehaviors) throws IOException
IOException
public static boolean renderBehaviorizedAttribute(FacesContext facesContext, ResponseWriter writer, String componentProperty, UIComponent component, String eventName, Map<String,List<ClientBehavior>> clientBehaviors, String htmlAttrName) throws IOException
facesContext
- writer
- component
- clientBehaviors
- eventName
- componentProperty
- htmlAttrName
- IOException
public static boolean renderBehaviorizedAttribute(FacesContext facesContext, ResponseWriter writer, String componentProperty, UIComponent component, String sourceId, String eventName, Map<String,List<ClientBehavior>> clientBehaviors, String htmlAttrName) throws IOException
IOException
public static boolean renderBehaviorizedAttribute(FacesContext facesContext, ResponseWriter writer, String componentProperty, UIComponent component, String eventName, Collection<ClientBehaviorContext.Parameter> eventParameters, Map<String,List<ClientBehavior>> clientBehaviors, String htmlAttrName, String attributeValue) throws IOException
facesContext
- writer
- componentProperty
- component
- eventName
- clientBehaviors
- htmlAttrName
- attributeValue
- IOException
public static boolean renderBehaviorizedAttribute(FacesContext facesContext, ResponseWriter writer, String componentProperty, UIComponent component, String sourceId, String eventName, Collection<ClientBehaviorContext.Parameter> eventParameters, Map<String,List<ClientBehavior>> clientBehaviors, String htmlAttrName, String attributeValue) throws IOException
IOException
public static boolean renderBehaviorizedAttribute(FacesContext facesContext, ResponseWriter writer, String componentProperty, UIComponent component, String eventName, Collection<ClientBehaviorContext.Parameter> eventParameters, Map<String,List<ClientBehavior>> clientBehaviors, String htmlAttrName, String attributeValue, String serverSideScript) throws IOException
facesContext
- writer
- componentProperty
- component
- eventName
- clientBehaviors
- htmlAttrName
- attributeValue
- serverSideScript
- IOException
public static boolean renderBehaviorizedAttribute(FacesContext facesContext, ResponseWriter writer, String componentProperty, UIComponent component, String sourceId, String eventName, Collection<ClientBehaviorContext.Parameter> eventParameters, Map<String,List<ClientBehavior>> clientBehaviors, String htmlAttrName, String attributeValue, String serverSideScript) throws IOException
IOException
public static boolean renderBehaviorizedAttribute(FacesContext facesContext, ResponseWriter writer, String componentProperty, UIComponent component, String eventName, Collection<ClientBehaviorContext.Parameter> eventParameters, String eventName2, Collection<ClientBehaviorContext.Parameter> eventParameters2, Map<String,List<ClientBehavior>> clientBehaviors, String htmlAttrName, String attributeValue, String serverSideScript) throws IOException
IOException
public static boolean renderBehaviorizedAttribute(FacesContext facesContext, ResponseWriter writer, String componentProperty, UIComponent component, String sourceId, String eventName, Collection<ClientBehaviorContext.Parameter> eventParameters, String eventName2, Collection<ClientBehaviorContext.Parameter> eventParameters2, Map<String,List<ClientBehavior>> clientBehaviors, String htmlAttrName, String attributeValue, String serverSideScript) throws IOException
IOException
public static void renderBehaviorizedEventHandlers(FacesContext facesContext, ResponseWriter writer, UIComponent uiComponent, Map<String,List<ClientBehavior>> clientBehaviors) throws IOException
IOException
public static void renderBehaviorizedEventHandlers(FacesContext facesContext, ResponseWriter writer, UIComponent uiComponent, String sourceId, Map<String,List<ClientBehavior>> clientBehaviors) throws IOException
IOException
public static void renderBehaviorizedEventHandlersWithoutOnclick(FacesContext facesContext, ResponseWriter writer, UIComponent uiComponent, Map<String,List<ClientBehavior>> clientBehaviors) throws IOException
IOException
public static void renderBehaviorizedEventHandlersWithoutOnmouseoverAndOnmouseout(FacesContext facesContext, ResponseWriter writer, UIComponent uiComponent, Map<String,List<ClientBehavior>> clientBehaviors) throws IOException
IOException
public static void renderBehaviorizedFieldEventHandlers(FacesContext facesContext, ResponseWriter writer, UIComponent uiComponent, Map<String,List<ClientBehavior>> clientBehaviors) throws IOException
IOException
public static void renderBehaviorizedFieldEventHandlersWithoutOnfocus(FacesContext facesContext, ResponseWriter writer, UIComponent uiComponent, Map<String,List<ClientBehavior>> clientBehaviors) throws IOException
IOException
public static void renderBehaviorizedFieldEventHandlersWithoutOnchange(FacesContext facesContext, ResponseWriter writer, UIComponent uiComponent, Map<String,List<ClientBehavior>> clientBehaviors) throws IOException
IOException
public static void renderBehaviorizedFieldEventHandlersWithoutOnchange(FacesContext facesContext, ResponseWriter writer, UIComponent uiComponent, String sourceId, Map<String,List<ClientBehavior>> clientBehaviors) throws IOException
IOException
public static void renderBehaviorizedFieldEventHandlersWithoutOnchangeAndOnselect(FacesContext facesContext, ResponseWriter writer, UIComponent uiComponent, Map<String,List<ClientBehavior>> clientBehaviors) throws IOException
IOException
public static boolean renderBehaviorizedOnchangeEventHandler(FacesContext facesContext, ResponseWriter writer, UIComponent uiComponent, Map<String,List<ClientBehavior>> clientBehaviors) throws IOException
IOException
public static boolean renderBehaviorizedOnchangeEventHandler(FacesContext facesContext, ResponseWriter writer, UIComponent uiComponent, String sourceId, Map<String,List<ClientBehavior>> clientBehaviors) throws IOException
IOException
public static boolean isHideNoSelectionOption(UIComponent component)
component
- public static void renderUnhandledFacesMessages(FacesContext facesContext) throws IOException
facesContext
- IOException
Copyright © 2020 The Apache Software Foundation. All rights reserved.