|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tiles.mgmt.TileDefinition
org.apache.tiles.definition.ComponentDefinition
public class ComponentDefinition
TileDefinition of a template / component attributes. Attributes of a component can be defined with the help of this class. An instance of this class can be used as a bean, and passed to 'insert' tag.
Field Summary | |
---|---|
protected static org.apache.commons.logging.Log |
log
Commons Logging instance. |
Fields inherited from class org.apache.tiles.mgmt.TileDefinition |
---|
attributes, inherit, name, preparer, role, template |
Constructor Summary | |
---|---|
ComponentDefinition()
Constructor. |
|
ComponentDefinition(java.lang.String name,
java.lang.String template,
java.util.Map<java.lang.String,org.apache.tiles.ComponentAttribute> attributes)
Constructor. |
|
ComponentDefinition(org.apache.tiles.mgmt.TileDefinition definition)
Copy Constructor. |
Method Summary | |
---|---|
void |
addAttribute(org.apache.tiles.ComponentAttribute attribute)
Add an attribute to this component. |
boolean |
isExtending()
Get extends flag. |
boolean |
isIsVisited()
Returns the visit flag, used during inheritance resolution. |
void |
put(java.lang.String name,
java.lang.Object content)
Put an attribute in component / template definition. |
void |
put(java.lang.String name,
java.lang.Object content,
java.lang.String role)
Put an attribute in template definition. |
void |
put(java.lang.String name,
java.lang.Object content,
java.lang.String type,
java.lang.String role)
Put an attribute in template definition. |
void |
putAttribute(java.lang.String key,
org.apache.tiles.ComponentAttribute value)
Put a new attribute in this component |
void |
setIsVisited(boolean isVisited)
Sets the visit flag, used during inheritance resolution. |
java.lang.String |
toString()
Returns a description of the attributes. |
Methods inherited from class org.apache.tiles.mgmt.TileDefinition |
---|
getAttribute, getAttributes, getExtends, getName, getPreparer, getRole, getTemplate, setExtends, setName, setPreparer, setRole, setTemplate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static org.apache.commons.logging.Log log
Constructor Detail |
---|
public ComponentDefinition()
public ComponentDefinition(org.apache.tiles.mgmt.TileDefinition definition)
public ComponentDefinition(java.lang.String name, java.lang.String template, java.util.Map<java.lang.String,org.apache.tiles.ComponentAttribute> attributes)
Method Detail |
---|
public void putAttribute(java.lang.String key, org.apache.tiles.ComponentAttribute value)
key
- String key for attributevalue
- Attibute value.public void put(java.lang.String name, java.lang.Object content)
name
- Attribute namecontent
- Attribute valuepublic void put(java.lang.String name, java.lang.Object content, java.lang.String role)
name
- Attribute namecontent
- Attribute valuerole
- Determine if content is used by get tag. If user is in role, content is used.public void put(java.lang.String name, java.lang.Object content, java.lang.String type, java.lang.String role)
name
- Attribute namecontent
- Attribute valuetype
- attribute type: template, string, definitionrole
- Determine if content is used by get tag. If user is in role, content is used.public java.lang.String toString()
toString
in class java.lang.Object
public void addAttribute(org.apache.tiles.ComponentAttribute attribute)
attribute
- Attribute to add.public boolean isExtending()
public void setIsVisited(boolean isVisited)
isVisited
- true
is the definition has been visited.public boolean isIsVisited()
true
is the definition has been visited.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |