|
RichFaces UI Components UI 4.2.2.Final | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.richfaces.renderkit.util.RendererUtils
public final class RendererUtils
Util class for common render operations - render passthru html attributes, iterate over child components etc.
Field Summary | |
---|---|
static String |
DUMMY_FORM_ID
|
Constructor Summary | |
---|---|
protected |
RendererUtils()
|
Method Summary | |
---|---|
protected Object |
attributeValue(String name,
Object value)
Convert attribute value to proper object. |
String |
clientId(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
Simplified version of encodeId |
String |
correctForIdReference(String forAttr,
javax.faces.component.UIComponent component)
If target component contains generated id and for doesn't, correct for id |
Map<String,Object> |
createParametersMap(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
|
Object |
createParameterValue(javax.faces.component.UIParameter parameter)
Returns value of the parameter. |
void |
encodeAttribute(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
Object property,
String attributeName)
|
void |
encodeAttribute(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
String attribute)
|
void |
encodeAttributes(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
String attrs)
Encode attributes given by comma-separated string list. |
void |
encodeAttributesFromArray(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
String[] attrs)
|
void |
encodeBeginForm(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
javax.faces.context.ResponseWriter writer,
String clientId)
|
void |
encodeBeginFormIfNessesary(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
|
void |
encodeChildren(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
|
void |
encodeCustomId(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
Encode id attribute with clientId component property. |
void |
encodeEndForm(javax.faces.context.FacesContext context,
javax.faces.context.ResponseWriter writer)
|
void |
encodeEndFormIfNessesary(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
|
void |
encodeId(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
Encode id attribute with clientId component property |
void |
encodeId(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
String attribute)
Encode clientId to custom attribute ( for example, to control name ) |
void |
encodePassThru(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
String defaultHtmlEvent)
Encode common pass-thru html attributes. |
void |
encodePassThruAttribute(javax.faces.context.FacesContext context,
Map<String,Object> attributes,
javax.faces.context.ResponseWriter writer,
String attribute)
Encode one pass-thru attribute, with plain/boolean/url value, got from properly component attribute. |
void |
encodePassThruWithExclusions(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
String exclusions,
String defaultHtmlEvent)
Encode pass-through attributes except specified ones |
void |
encodePassThruWithExclusionsArray(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
String[] exclusions,
String defaultHtmlEvent)
|
String |
encodePctOrPx(String value)
formats given value to |
String |
encodePx(String value)
|
javax.faces.component.UIComponent |
findComponentFor(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
String id)
|
javax.faces.component.UIComponent |
findComponentFor(javax.faces.component.UIComponent component,
String id)
|
String |
getActionUrl(javax.faces.context.FacesContext facesContext)
|
protected Object |
getComponentAttributeName(Object key)
Convert HTML attribute name to component property name. |
static RendererUtils |
getInstance()
Use this method to get singleton instance of RendererUtils |
javax.faces.component.UIComponent |
getNestingForm(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
Find nested form for given component |
boolean |
hasExplicitId(javax.faces.component.UIComponent component)
|
boolean |
isBooleanAttribute(javax.faces.component.UIComponent component,
String name)
Get boolean value of logical attribute |
boolean |
isEmpty(Object o)
Checks if the argument passed in is empty or not. |
void |
writeScript(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
Object script)
Wtrie JavaScript with start/end elements and type. |
static void |
writeState(javax.faces.context.FacesContext context)
Write state saving markers to context, include MyFaces view sequence. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DUMMY_FORM_ID
Constructor Detail |
---|
protected RendererUtils()
Method Detail |
---|
public static RendererUtils getInstance()
public void encodeId(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) throws IOException
context
- component
-
IOException
public void encodeId(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, String attribute) throws IOException
context
- component
- attribute
-
IOException
public void encodeCustomId(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) throws IOException
context
- component
-
IOException
public Object createParameterValue(javax.faces.component.UIParameter parameter)
JavaScriptParameter
, NoEcape
attribute is applied.
parameter
- instance of UIParameter
Object
parameter valuepublic Map<String,Object> createParametersMap(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
public void encodePassThru(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, String defaultHtmlEvent) throws IOException
context
- component
-
IOException
public void encodePassThruWithExclusions(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, String exclusions, String defaultHtmlEvent) throws IOException
context
- component
- exclusions
-
IOException
public void encodePassThruWithExclusionsArray(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, String[] exclusions, String defaultHtmlEvent) throws IOException
IOException
public void encodePassThruAttribute(javax.faces.context.FacesContext context, Map<String,Object> attributes, javax.faces.context.ResponseWriter writer, String attribute) throws IOException
context
- writer
- attribute
-
IOException
public void encodeAttributesFromArray(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, String[] attrs) throws IOException
IOException
public void encodeAttributes(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, String attrs) throws IOException
context
- current JSF contextcomponent
- for with render attributes valuesattrs
- comma separated list of attributes
IOException
public void encodeAttribute(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, Object property, String attributeName) throws IOException
context
- component
- property
- attributeName
-
IOException
public void encodeAttribute(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, String attribute) throws IOException
IOException
public boolean isEmpty(Object o)
null
o
- object to check for emptiness
true
if the argument is empty, false
otherwiseprotected Object getComponentAttributeName(Object key)
key
-
protected Object attributeValue(String name, Object value)
name
- attribute name.value
-
public boolean isBooleanAttribute(javax.faces.component.UIComponent component, String name)
component
- name
- attribute name
public String encodePx(String value)
public String encodePctOrPx(String value)
value
-
public javax.faces.component.UIComponent getNestingForm(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
component
-
UIForm
component, or null
public void encodeBeginFormIfNessesary(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) throws IOException
context
- component
-
IOException
public void encodeBeginForm(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, javax.faces.context.ResponseWriter writer, String clientId) throws IOException
context
- component
- writer
- clientId
-
IOException
public void encodeEndFormIfNessesary(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) throws IOException
context
- component
-
IOException
public static void writeState(javax.faces.context.FacesContext context) throws IOException
context
-
IOException
public void encodeEndForm(javax.faces.context.FacesContext context, javax.faces.context.ResponseWriter writer) throws IOException
context
- writer
-
IOException
public String getActionUrl(javax.faces.context.FacesContext facesContext)
facesContext
-
public String clientId(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
encodeId
context
- component
-
public void writeScript(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, Object script) throws IOException
context
- component
- script
-
IOException
public String correctForIdReference(String forAttr, javax.faces.component.UIComponent component)
forAttr
- component
- public void encodeChildren(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) throws IOException
IOException
public boolean hasExplicitId(javax.faces.component.UIComponent component)
public javax.faces.component.UIComponent findComponentFor(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, String id)
public javax.faces.component.UIComponent findComponentFor(javax.faces.component.UIComponent component, String id)
component
- id
-
|
RichFaces UI Components UI 4.2.2.Final | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |