|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.kuali.rice.krad.datadictionary.DictionaryBeanBase
org.kuali.rice.krad.datadictionary.uif.UifDictionaryBeanBase
org.kuali.rice.krad.uif.layout.LayoutManagerBase
public abstract class LayoutManagerBase
Base class for all layout managers
Provides general properties of all layout managers, such as the unique id, rendering template, and style settings
| Field Summary |
|---|
| Fields inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase |
|---|
componentCode, namespaceCode |
| Constructor Summary | |
|---|---|
LayoutManagerBase()
|
|
| Method Summary | ||
|---|---|---|
void |
addStyleClass(String styleClass)
This method adds a single style class to the list of css style classes on this component |
|
void |
appendToStyle(String styleRules)
Appends to the inline style set on this layoutManager |
|
void |
checkMutable(boolean legalDuringInitialization)
Check for mutability on the element before modifying state. |
|
LayoutManagerBase |
clone()
Override Object.clone() to assign the public modifier. |
|
protected
|
copyProperties(T layoutManager)
Copies properties for copy() |
|
List<String> |
getAdditionalCssClasses()
|
|
List<Component> |
getComponentPrototypes()
List of components that are maintained by the layout manager as prototypes for creating other component instances |
|
List<Component> |
getComponentsForLifecycle()
List of components that are contained within the layout manager that should be sent through the lifecycle |
|
Map<String,Object> |
getContext()
Context map for the layout manager |
|
List<String> |
getCssClasses()
CSS style class(s) to be applied to the area (div) the layout manager generates for the items |
|
String |
getId()
The unique id (within a given tree) for the element. |
|
List<String> |
getLibraryCssClasses()
Additional css classes that come before css classes listed in the cssClasses property |
|
List<PropertyReplacer> |
getPropertyReplacers()
List of PropertyReplacer instances that will be
evaluated during the view lifecycle to conditional set properties on the
LayoutManager based on expression evaluations |
|
String |
getStyle()
CSS style string to be applied to the area (div) the layout manager generates for the items |
|
String |
getStyleClassesAsString()
Builds the HTML class attribute string by combining the styleClasses list with a space delimiter |
|
Class<? extends Container> |
getSupportedContainer()
Default Impl |
|
String |
getTemplate()
The path to the JSP file that should be called to invoke the layout manager |
|
String |
getTemplateName()
The name for which the template can be invoked by |
|
void |
initializePendingTasks(ViewLifecyclePhase phase,
Queue<ViewLifecycleTask> pendingTasks)
Initialize the lifecycle task queue for this component on the given lifecycle phase. |
|
boolean |
isMutable(boolean legalDuringInitialization)
Determine if this lifecycle element is mutable. |
|
void |
performApplyModel(Object model,
Component component)
Called after the initialize phase to perform conditional logic based on the model data |
|
void |
performFinalize(Object model,
Component component)
The last phase before the view is rendered |
|
void |
performInitialization(Object model)
Initializes the component |
|
void |
preventModification()
Mark this instance as cached to prevent modification. |
|
void |
pushAllToContext(Map<String,Object> sourceContext)
Places all entries from a map into the context Map for the layout manager. |
|
void |
pushObjectToContext(String objectName,
Object object)
Places the given object into the context Map for the layout manager with the given name |
|
void |
setAdditionalCssClasses(List<String> additionalCssClasses)
|
|
void |
setCached(boolean cached)
|
|
void |
setContext(Map<String,Object> context)
Setter for the context Map |
|
void |
setCssClasses(List<String> cssClasses)
Setter for the layout manager div style class |
|
void |
setId(String id)
Setter for the unique id (within a given tree) for the component |
|
void |
setLibraryCssClasses(List<String> libraryCssClasses)
Set the libraryCssClasses |
|
void |
setPropertyReplacers(List<PropertyReplacer> propertyReplacers)
Setter for the layout managers property substitutions |
|
void |
setStyle(String style)
Setter for the layout manager div style |
|
void |
setStyleClasses(String styleClasses)
Sets the styleClasses list from the given string that has the classes delimited by space. |
|
void |
setTemplate(String template)
Setter for the layout managers template |
|
void |
setTemplateName(String templateName)
Setter for the name of the template (a name which can be used to invoke) |
|
| Methods inherited from class org.kuali.rice.krad.datadictionary.uif.UifDictionaryBeanBase |
|---|
getExpressionGraph, getPropertyExpression, getPropertyExpressions, getRefreshExpressionGraph, setExpressionGraph, setPropertyExpressions, setRefreshExpressionGraph |
| Methods inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase |
|---|
copy, dataDictionaryPostProcessing, getComponentCode, getNamespaceCode, setComponentCode, setNamespaceCode |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.kuali.rice.krad.datadictionary.uif.UifDictionaryBean |
|---|
getExpressionGraph, getPropertyExpression, getPropertyExpressions, getRefreshExpressionGraph, setExpressionGraph, setPropertyExpressions, setRefreshExpressionGraph |
| Methods inherited from interface org.kuali.rice.krad.datadictionary.DictionaryBean |
|---|
dataDictionaryPostProcessing, getComponentCode, getNamespaceCode |
| Methods inherited from interface org.kuali.rice.krad.datadictionary.Copyable |
|---|
copy |
| Constructor Detail |
|---|
public LayoutManagerBase()
| Method Detail |
|---|
public void checkMutable(boolean legalDuringInitialization)
LifecycleElement
checkMutable in interface LifecycleElementlegalDuringInitialization - True if the operation is legal during view initialization,
false if the operation is only allowed during the component lifecycle.LifecycleElement.checkMutable(boolean)public boolean isMutable(boolean legalDuringInitialization)
LifecycleElementMost lifecycle element are immutable, and all are immutable expect during initialization and the during the view lifecycle. Those that have been copied within the view lifecycle, however, may be modified during the same lifecycle.
isMutable in interface LifecycleElementLifecycleElement.isMutable(boolean)public void setCached(boolean cached)
mutable - the mutable to setpublic void performInitialization(Object model)
LifecycleElementWhere components can set defaults and setup other necessary state. The initialize method should only be called once per component lifecycle and is invoked within the initialize phase of the view lifecylce.
performInitialization in interface LifecycleElementmodel - - object instance containing the view dataLifecycleElement.performInitialization(Object)
public void performApplyModel(Object model,
Component component)
LifecycleElementWhere components can perform conditional logic such as dynamically generating new fields or setting field state based on the given data
performApplyModel in interface LifecycleElementmodel - - Top level object containing the data (could be the form or a
top level business object, dto)LifecycleElement.performApplyModel(Object, Component)
public void performFinalize(Object model,
Component component)
LifecycleElementHere final preparations can be made based on the updated view state.
performFinalize in interface LifecycleElementmodel - - top level object containing the datacomponent - - parent componentLifecycleElement.performFinalize(Object, Component)
public void initializePendingTasks(ViewLifecyclePhase phase,
Queue<ViewLifecycleTask> pendingTasks)
LifecycleElement
Any tasks added to the queue by this method will be performed after the default lifecycle
phase processing method LifecycleElement.performInitialization(Object),
LifecycleElement.performApplyModel(Object, Component), or LifecycleElement.performFinalize(Object, Component)
has been called.
initializePendingTasks in interface LifecycleElementphase - The lifecycle phase to queue pending tasks for.pendingTasks - The pending task queue.LifecycleElement.initializePendingTasks(org.kuali.rice.krad.uif.lifecycle.ViewLifecyclePhase, java.util.Queue)public Class<? extends Container> getSupportedContainer()
getSupportedContainer in interface LayoutManagerLayoutManager.getSupportedContainer()public List<Component> getComponentsForLifecycle()
LayoutManager
Used by ViewHelperService for the various lifecycle
callbacks
getComponentsForLifecycle in interface LayoutManagerLayoutManager.getComponentsForLifecycle()public List<Component> getComponentPrototypes()
LayoutManagerPrototypes are held for configuring how a component should be created during the lifecycle. An example of this are the fields in a collection group that are created for each collection record. They only participate in the initialize phase.
getComponentPrototypes in interface LayoutManagerLayoutManager.getComponentPrototypes()public String getId()
LifecycleElementThe id is used to identify an element instance within the tree, and will be used by renderers to set the HTML element id. This gives a way to find various elements for scripting. If the id is not given, a default will be generated by the framework.
getId in interface LifecycleElementLifecycleElement.getId()public void setId(String id)
LifecycleElement
setId in interface LifecycleElementid - - string to set as the component idLifecycleElement.setId(java.lang.String)public String getTemplate()
LayoutManagerThe path should be relative to the web root. All layout manager templates receive the list of items of be placed, the configured layout manager, and the container to which the layout manager applies
e.g. '/krad/WEB-INF/jsp/tiles/boxLayout.jsp'
getTemplate in interface LayoutManagerLayoutManager.getTemplate()public void setTemplate(String template)
LayoutManager
setTemplate in interface LayoutManagerLayoutManager.setTemplate(java.lang.String)public String getTemplateName()
LayoutManagerWhether the template name is needed depends on the underlying rendering engine being used. In the example of Freemarker, the template points to the actual source file, which then loads a macro. From then on the macro is simply invoked to execute the template
e.g. 'uif_grid'
getTemplateName in interface LayoutManagerLayoutManager.getTemplateName()public void setTemplateName(String templateName)
LayoutManager
setTemplateName in interface LayoutManagerLayoutManager.setTemplateName(java.lang.String)public String getStyle()
LayoutManager
Note the styleClass/style configured on the Container
applies to all the container content (header, body, footer), while the
styleClass/style configured on the LayoutManager only
applies to the div surrounding the items placed by the manager (the
container's body)
Any style override or additions can be specified with this attribute. This is used by the renderer to set the style attribute on the corresponding element.
e.g. 'color: #000000;text-decoration: underline;'
getStyle in interface LayoutManagerLayoutManager.getStyle()public void setStyle(String style)
LayoutManager
setStyle in interface LayoutManagerLayoutManager.setStyle(java.lang.String)public List<String> getLibraryCssClasses()
These are used by the framework for styling with a library (for example, bootstrap), and should normally not be overridden.
getLibraryCssClasses in interface LayoutManagerpublic void setLibraryCssClasses(List<String> libraryCssClasses)
setLibraryCssClasses in interface LayoutManagerlibraryCssClasses - public List<String> getCssClasses()
LayoutManager
Note the styleClass/style configured on the Container
applies to all the container content (header, body, footer), while the
styleClass/style configured on the LayoutManager only
applies to the div surrounding the items placed by the manager (the
container's body)
Declares additional style classes for the div. Multiple classes are specified with a space delimiter. This is used by the renderer to set the class attribute on the corresponding element. The class(s) declared must be available in the common style sheets or the style sheets specified for the view
e.g. 'header left'
getCssClasses in interface LayoutManagerLayoutManager.getCssClasses()public void setCssClasses(List<String> cssClasses)
LayoutManager
setCssClasses in interface LayoutManagerLayoutManager.setCssClasses(java.util.List)public List<String> getAdditionalCssClasses()
getAdditionalCssClasses in interface LayoutManagerLayoutManager.getAdditionalCssClasses()public void setAdditionalCssClasses(List<String> additionalCssClasses)
setAdditionalCssClasses in interface LayoutManagerLayoutManager.setAdditionalCssClasses(java.util.List)public String getStyleClassesAsString()
public void setStyleClasses(String styleClasses)
styleClasses - public void addStyleClass(String styleClass)
LayoutManager
addStyleClass in interface LayoutManagerLayoutManager.addStyleClass(java.lang.String)public void appendToStyle(String styleRules)
LayoutManager
appendToStyle in interface LayoutManagerLayoutManager.appendToStyle(java.lang.String)public Map<String,Object> getContext()
LayoutManager
getContext in interface LayoutManagerLayoutManager.getContext()public void setContext(Map<String,Object> context)
LayoutManager
setContext in interface LayoutManagerLayoutManager.setContext(java.util.Map)
public void pushObjectToContext(String objectName,
Object object)
LayoutManager
pushObjectToContext in interface LayoutManagerLayoutManager.pushObjectToContext(java.lang.String,
java.lang.Object)public void pushAllToContext(Map<String,Object> sourceContext)
LayoutManager
pushAllToContext in interface LayoutManagersourceContext - The map to push entries from.LayoutManager.pushAllToContext(java.util.Map)public List<PropertyReplacer> getPropertyReplacers()
LayoutManagerPropertyReplacer instances that will be
evaluated during the view lifecycle to conditional set properties on the
LayoutManager based on expression evaluations
getPropertyReplacers in interface LayoutManagerLayoutManager.getPropertyReplacers()public void setPropertyReplacers(List<PropertyReplacer> propertyReplacers)
LayoutManager
setPropertyReplacers in interface LayoutManagerLayoutManager.setPropertyReplacers(java.util.List)
public LayoutManagerBase clone()
throws CloneNotSupportedException
CopyableObject.clone() to assign the public modifier.
clone in interface Copyableclone in class DictionaryBeanBaseCloneNotSupportedExceptionCopyable.clone()public void preventModification()
preventModification in interface CopyablepreventModification in class DictionaryBeanBaseCopyable.preventModification()protected <T> void copyProperties(T layoutManager)
DictionaryBeanBase
copyProperties in class UifDictionaryBeanBaselayoutManager - base beanDictionaryBeanBase.copyProperties(Object)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||