|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.shale.clay.utils.ClayAmalgam
public class ClayAmalgam
This class is a mix of runtime utilities for the
Clay
component. It is loaded as a
managed bean in application scope by the clay component's registration.
Constructor Summary | |
---|---|
ClayAmalgam()
|
Method Summary | |
---|---|
void |
clayForEach(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
Object displayElementRoot)
This is a method binding "validator" signature that can be bound to the shapeValidator attribute of the
Clay component. |
void |
clayImport(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
Object displayElementRoot)
This is a method binding "validator" signature that can be bound to the shapeValidator attribute of the
Clay component. |
void |
clayOut(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
Object displayElementRoot)
This is a method binding "validator" signature that can be bound to the shapeValidator attribute of the
Clay component. |
String |
decode(String value)
Decodes a string value using the decodeMap . |
String |
encode(String value)
Encodes a string value using the encodeMap . |
protected void |
replace(StringBuffer document,
Map context)
Replaces tokens in the document with matching tokens in
the context . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClayAmalgam()
Method Detail |
---|
protected void replace(StringBuffer document, Map context)
Replaces tokens in the document
with matching tokens in
the context
.
document
- containing tokens to replacecontext
- tokenspublic String encode(String value)
Encodes a string value using the encodeMap
.
value
- source string
public String decode(String value)
Decodes a string value using the decodeMap
.
value
- source string
public void clayOut(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, Object displayElementRoot)
This is a method binding "validator" signature that can be bound to the
shapeValidator
attribute of the
Clay
component. It expects that
the value
attribute will contain an html string that
represents an HTML node. The value will be encode or decode depending on
the value of the escapeXml
optional attribute. The default
is "false".
context
- faces contextcomponent
- claydisplayElementRoot
- config beanpublic void clayImport(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, Object displayElementRoot)
This is a method binding "validator" signature that can be bound to the
shapeValidator
attribute of the
Clay
component. It expects that
the url
attribute will contain the file to import relative
to the web context root. The content of the file will be encode or decode
depending on the value of the escapeXml
optional
attribute. The default doesn't apply any encoding.
context
- faces contextcomponent
- claydisplayElementRoot
- config beanpublic void clayForEach(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, Object displayElementRoot)
This is a method binding "validator" signature that can be bound to the
shapeValidator
attribute of the
Clay
component. It expects four
attributes value, bodyJsfid, var and scope. The value
attribute is like a dataTable. It should be a value binding expression
that is a Map, List or Object[]. The bodyJsfid
attribute
is root of the subtree that will be repeated in the for loop. The
var
attribute is the tag used to cache a Map of the bound
objects. It will always be loaed in "session" scope. Limitation exists
because the "shapeValidator" event is only called when the component is
created. This means that you must take care in removing the
var
object from session scope.
context
- facescomponent
- claydisplayElementRoot
- config bean
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |