Class XmlDefinition
java.lang.Object
org.apache.struts.tiles.ComponentDefinition
org.apache.struts.tiles.xmlDefinition.XmlDefinition
- All Implemented Interfaces:
Serializable
A definition read from an XML definitions file.
- See Also:
-
Field Summary
Fields inherited from class org.apache.struts.tiles.ComponentDefinition
ACTION, attributes, controller, CONTROLLER, controllerType, name, path, role, URL
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAttribute
(XmlAttribute attribute) Add an attribute to this component.Get extends.boolean
Get extends flag.void
overload
(XmlDefinition child) Overload this definition with passed child.void
resolveInheritance
(XmlDefinitionsSet definitionsSet) Resolve inheritance.void
setExtends
(String name) Set extends.void
setIsVisited
(boolean isVisited) Set isVisited.Methods inherited from class org.apache.struts.tiles.ComponentDefinition
createController, createControllerFromClassname, getAttribute, getAttributes, getController, getControllerInstance, getControllerType, getName, getOrCreateController, getPage, getPath, getRole, getTemplate, put, put, put, put, putAttribute, setController, setControllerClass, setControllerInstance, setControllerType, setControllerUrl, setName, setPage, setPath, setRole, setTemplate, toString
-
Constructor Details
-
XmlDefinition
public XmlDefinition()Constructor.
-
-
Method Details
-
addAttribute
Add an attribute to this component.- Parameters:
attribute
- Attribute to add.
-
setExtends
Set extends.- Parameters:
name
- Name of the extended definition.
-
getExtends
Get extends.- Returns:
- Name of the extended definition.
-
isExtending
public boolean isExtending()Get extends flag. -
setIsVisited
public void setIsVisited(boolean isVisited) Set isVisited. -
resolveInheritance
Resolve inheritance. First, resolve parent's inheritance, then set path to the parent's path. Also copy attributes setted in parent, and not set in child If instance doesn't extend anything, do nothing.- Throws:
NoSuchDefinitionException
- If an inheritance can not be solved.
-
overload
Overload this definition with passed child. All attributes from child are copied to this definition. Previous attributes with same name are disguarded. Special attribute 'path','role' and 'extends' are overloaded if defined in child.- Parameters:
child
- Child used to overload this definition.
-