|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.seam.ui.util.cdk.RendererUtils
public class RendererUtils
Util class for common render operations - render passthru html attributes, iterate over child components etc.
Nested Class Summary | |
---|---|
static interface |
RendererUtils.HTML
Common HTML elements and attributes names. |
Field Summary | |
---|---|
static java.lang.String |
DUMMY_FORM_ID
|
Constructor Summary | |
---|---|
RendererUtils()
|
Method Summary | |
---|---|
protected java.lang.Object |
attributeValue(java.lang.String name,
java.lang.Object value)
Convert attribute value to proper object. |
java.lang.String |
clientId(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
Simplified version of encodeId() |
void |
encodeAttribute(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.lang.Object property,
java.lang.String attributeName)
|
void |
encodeAttribute(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.lang.String attribute)
|
void |
encodeAttributes(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.lang.String attrs)
Encode attributes given by comma-separated string list. |
void |
encodeAttributesFromArray(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.lang.String[] attrs)
|
void |
encodeBeginForm(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
javax.faces.context.ResponseWriter writer,
java.lang.String clientId)
|
void |
encodeBeginFormIfNessesary(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,
java.lang.String attribute)
Encode clientId to custom attribute ( for example, to control name ) |
void |
encodePassThru(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
Encode common pass-thru html attributes. |
void |
encodePassThruAttribute(javax.faces.context.FacesContext context,
java.util.Map attributes,
javax.faces.context.ResponseWriter writer,
java.lang.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,
java.lang.String exclusions)
Encode pass-through attributes except specified ones |
void |
encodePassThruWithExclusionsArray(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.lang.String[] exclusions)
|
java.lang.String |
formatValue(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.lang.Object value)
Convert any object value to string. |
java.lang.String |
getActionUrl(javax.faces.context.FacesContext facesContext)
|
protected java.lang.Object |
getComponentAttributeName(java.lang.Object key)
Convert HTML attribute name to component property name. |
javax.faces.component.UIForm |
getNestingForm(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
Find nested form for given component |
java.lang.String |
getValueAsString(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
Return converted value for ValueHolder as String,
perform nessesary convertions. |
boolean |
isBooleanAttribute(javax.faces.component.UIComponent component,
java.lang.String name)
Get boolean value of logical attribute |
boolean |
isValidProperty(java.lang.Object property)
Test for valid value of property. |
boolean |
shouldRenderAttribute(java.lang.Object attributeVal)
|
void |
writeAttribute(javax.faces.context.ResponseWriter writer,
java.lang.String attribute,
java.lang.Object value)
Write html-attribute |
void |
writeScript(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.lang.Object script)
Wtrie JavaScript with start/end elements and type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DUMMY_FORM_ID
Constructor Detail |
---|
public RendererUtils()
Method Detail |
---|
public void encodeId(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) throws java.io.IOException
java.io.IOException
public void encodeId(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.String attribute) throws java.io.IOException
java.io.IOException
public void encodeCustomId(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) throws java.io.IOException
java.io.IOException
public void encodePassThru(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) throws java.io.IOException
java.io.IOException
public void encodePassThruWithExclusions(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.String exclusions) throws java.io.IOException
context
- component
- exclusions
-
java.io.IOException
public void encodePassThruWithExclusionsArray(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.String[] exclusions) throws java.io.IOException
java.io.IOException
public void encodePassThruAttribute(javax.faces.context.FacesContext context, java.util.Map attributes, javax.faces.context.ResponseWriter writer, java.lang.String attribute) throws java.io.IOException
java.io.IOException
public void encodeAttributesFromArray(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.String[] attrs) throws java.io.IOException
java.io.IOException
public void encodeAttributes(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.String attrs) throws java.io.IOException
context
- current JSF contextcomponent
- for with render attributes valuesattrs
- comma separated list of attributes
java.io.IOException
public void encodeAttribute(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.Object property, java.lang.String attributeName) throws java.io.IOException
java.io.IOException
public void encodeAttribute(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.String attribute) throws java.io.IOException
java.io.IOException
public void writeAttribute(javax.faces.context.ResponseWriter writer, java.lang.String attribute, java.lang.Object value) throws java.io.IOException
writer
- attribute
- value
-
java.io.IOException
public boolean shouldRenderAttribute(java.lang.Object attributeVal)
attributeVal
is an instance of a wrapper for a
primitive type and its value is equal to the default value for
that type as given in the spec.public boolean isValidProperty(java.lang.Object property)
property
- - value of property returned from UIComponent.getAttributes()
protected java.lang.Object getComponentAttributeName(java.lang.Object key)
protected java.lang.Object attributeValue(java.lang.String name, java.lang.Object value)
name
- attribute namepublic boolean isBooleanAttribute(javax.faces.component.UIComponent component, java.lang.String name)
component
- name
- attribute name
public java.lang.String getValueAsString(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
ValueHolder
as String,
perform nessesary convertions.
public java.lang.String formatValue(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.Object value)
ValueHolder
got Converter
for formatting.
If not, attempt to use converter based on value type.
public javax.faces.component.UIForm getNestingForm(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
UIForm
component, or null
public void encodeBeginFormIfNessesary(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) throws java.io.IOException
java.io.IOException
public void encodeBeginForm(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, javax.faces.context.ResponseWriter writer, java.lang.String clientId) throws java.io.IOException
java.io.IOException
public void encodeEndFormIfNessesary(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) throws java.io.IOException
java.io.IOException
public void encodeEndForm(javax.faces.context.FacesContext context, javax.faces.context.ResponseWriter writer) throws java.io.IOException
java.io.IOException
public java.lang.String getActionUrl(javax.faces.context.FacesContext facesContext)
public java.lang.String clientId(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
public void writeScript(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.Object script) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |