public class GroupBase extends ContainerBase implements Group
Field
or other Group
instances
Groups can exist at different levels of the View
, providing
conceptual groupings such as the page, section, and group. In addition, other
group types can be created to add behavior like collection support
Group
implementation has properties for defaulting the binding
information (such as the parent object path and a binding prefix) for the
fields it contains. During the phase these properties (if given) are set on
the fields contained in the Group
that implement
DataBinding
, unless they have already been set on the field.
Modifier and Type | Class and Description |
---|---|
static class |
GroupBase.ACTION_VALIDATION_COMPONENTS |
templateOptions
componentCode, namespaceCode
INITIAL_ORDER_VALUE
Constructor and Description |
---|
GroupBase()
Default Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
afterEvaluateExpression()
No-op implementation.
|
protected String |
buildInputFieldValidationActionScript(List<InputField> allInputFields,
List<String> excludedFields)
Helper method to build action script for input fields with actions that depend on the validation of
other input fields in the same group.
|
void |
completeValidation(ValidationTrace tracer)
Validates different requirements of component compiling a series of reports detailing information on errors
found in the component.
|
String |
getComponentTypeName()
The name for the component type
|
Disclosure |
getDisclosure()
Disclosure widget that provides collapse/expand functionality for the
group
|
String |
getFieldBindByNamePrefix()
Binding prefix string to set on each of the groups
DataField instances |
String |
getFieldBindingObjectPath()
Object binding path to set on each of the group's
InputField instances |
List<? extends Component> |
getItems()
List of Component instances that are held by
the container |
Scrollpane |
getScrollpane()
Scrollpane widget that provides scrolling functionality for the
group
|
Set<Class<? extends Component>> |
getSupportedComponents()
Set of Component classes that may be placed
into the container |
String |
getWrapperTag()
Defines the html tag that will wrap this group, if left blank, this will automatically be set
by the framework to the appropriate tag (in most cases section or div)
|
protected boolean |
isAjaxDisclosureGroup()
Returns true if this group has a Disclosure widget that is currently closed and using ajax disclosure
|
boolean |
isRenderLoading()
Determine the group should be rendered on initial load, or if a loading message should be rendered instead.
|
void |
performFinalize(Object model,
LifecycleElement parent)
Sets the section boolean to true if this group has a rendering header with text
The following finalization is performed:
Sets the headerText of the header Group if it is blank
Set the messageText of the summary Message if it is blank
Finalizes LayoutManager
The following finalization is done here:
progressiveRender and conditionalRefresh variables are processed if set
If any of the style properties were given, sets the style string on the style property
Set the skipInTabOrder flag for nested components
The last phase before the view is rendered
|
void |
performInitialization(Object model)
The following initialization is performed:
Sorts the containers list of components
Initializes the instructional field if necessary
Initializes LayoutManager
The following updates are done here:
Invoke performInitialize on component modifiers
Initializes the component
|
void |
setDisclosure(Disclosure disclosure)
Setter for the group's disclosure instance
|
void |
setFieldBindByNamePrefix(String fieldBindByNamePrefix)
Setter for the field binding prefix
|
void |
setFieldBindingObjectPath(String fieldBindingObjectPath)
Setter for the field object binding path
|
void |
setItems(List<? extends Component> items)
Setter for the containers list of components
|
protected void |
setNestedComponentId(Component component,
String newId)
Helper method for setting a new ID for the nested components
|
void |
setScrollpane(Scrollpane scrollpane)
Setter for the group's scrollpane instance
|
protected void |
setupValidationScripts(GroupBase.ACTION_VALIDATION_COMPONENTS... componentsToValidate)
Helper method to set the validation action scripts for widgets (at the very least, quickfinders, and currently,
at the most, inquiries also).
|
void |
setWrapperTag(String wrapperTag)
This method ...
|
protected boolean |
validateInputField(InputField inputField)
Helper method to determine whether the given input field needs validated or not.
|
getAdditionalTemplates, getDefaultItemPosition, getEnterKeyAction, getFooter, getHeader, getHeaderText, getHelp, getHelpTitle, getInstructionalMessage, getInstructionalText, getLayoutManager, getValidationMessages, isProcessRemoteFieldHolders, performApplyModel, setDefaultItemPosition, setEnterKeyAction, setFooter, setHeader, setHeaderText, setHelp, setInstructionalMessage, setInstructionalText, setLayoutManager, setRenderFooter, setRenderHeader, setTooltipOfComponent, setValidationMessages, sortItems
addAriaAttribute, addDataAttribute, addScriptDataAttribute, addStyleClass, addWrapperCssClass, appendToStyle, checkMutable, clone, getAdditionalComponentsToRefresh, getAdditionalComponentsToRefreshJs, getAdditionalCssClasses, getAlign, getAriaAttributes, getAriaAttributesAsString, getCanCopyOnReadOnly, getCellWidth, getColSpan, getComponentModifiers, getComponentSecurity, getConditionalRefresh, getConditionalRefreshConditionJs, getConditionalRefreshControlNames, getContainerIdSuffix, getContext, getCssClasses, getCssGridSizes, getDataAttributes, getEventHandlerScript, getExcludeIf, getExcludeUnless, getFieldsToSendOnRefresh, getFinalizeMethodAdditionalArguments, getFinalizeMethodInvoker, getFinalizeMethodToCall, getId, getLibraryCssClasses, getMethodToCallOnRefresh, getOnBlurScript, getOnChangeScript, getOnClickScript, getOnCloseScript, getOnDblClickScript, getOnDocumentReadyScript, getOnFocusScript, getOnInputScript, getOnKeyDownScript, getOnKeyPressScript, getOnKeyUpScript, getOnLoadScript, getOnMouseDownScript, getOnMouseMoveScript, getOnMouseOutScript, getOnMouseOverScript, getOnMouseUpScript, getOnSubmitScript, getOnUnloadScript, getOrder, getPhasePathMapping, getPostRenderContent, getPreRenderContent, getProgressiveDisclosureConditionJs, getProgressiveDisclosureControlNames, getProgressiveRender, getPropertyReplacerComponents, getPropertyReplacers, getReadOnly, getRefreshTimer, getRefreshWhenChangedPropertyNames, getRenderedHtmlOutput, getRequired, getRole, getRowSpan, getScriptDataAttributes, getScriptDataAttributesJs, getSimpleDataAttributes, getStyle, getStyleClassesAsString, getTemplate, getTemplateName, getTemplateOptions, getTemplateOptionsJSString, getTitle, getToolTip, getValign, getViewPath, getViewStatus, getWidth, getWrapperCssClasses, getWrapperCssClassesAsString, getWrapperStyle, initializeComponentSecurity, isDisableSessionPersistence, isDisclosedByAction, isEditAuthz, isFinal, isForceSessionPersistence, isHidden, isInitialized, isModelApplied, isMutable, isOmitFromFormPost, isProgressiveRenderAndRefresh, isProgressiveRenderViaAJAX, isRefreshedByAction, isRender, isRendered, isResetDataOnRefresh, isRetrieveViaAjax, isSelfRendered, isSkipInTabOrder, isViewAuthz, notifyCompleted, pushAllToContext, pushObjectToContext, pushToPropertyReplacerContext, setAdditionalComponentsToRefresh, setAdditionalCssClasses, setAlign, setAriaAttributes, setCanCopyOnReadOnly, setCellWidth, setColSpan, setComponentModifiers, setComponentSecurity, setConditionalRefresh, setContainerIdSuffix, setContext, setCssClasses, setCssGridSizes, setDataAttributes, setDisableSessionPersistence, setDisclosedByAction, setEditAuthz, setExcludeIf, setExcludeUnless, setFieldsToSendOnRefresh, setFinalizeMethodAdditionalArguments, setFinalizeMethodInvoker, setFinalizeMethodToCall, setForceSessionPersistence, setHidden, setId, setLibraryCssClasses, setMethodToCallOnRefresh, setOmitFromFormPost, setOnBlurScript, setOnChangeScript, setOnClickScript, setOnCloseScript, setOnDblClickScript, setOnDocumentReadyScript, setOnFocusScript, setOnInputScript, setOnKeyDownScript, setOnKeyPressScript, setOnKeyUpScript, setOnLoadScript, setOnMouseDownScript, setOnMouseMoveScript, setOnMouseOutScript, setOnMouseOverScript, setOnMouseUpScript, setOnSubmitScript, setOnUnloadScript, setOrder, setPhasePathMapping, setPostRenderContent, setPreRenderContent, setProgressiveRender, setProgressiveRenderAndRefresh, setProgressiveRenderViaAJAX, setPropertyReplacers, setReadOnly, setRefreshedByAction, setRefreshTimer, setRefreshWhenChangedPropertyNames, setRender, setRenderedHtmlOutput, setRequired, setResetDataOnRefresh, setRetrieveViaAjax, setRole, setRowSpan, setScriptDataAttributes, setSelfRendered, setSkipInTabOrder, setStyle, setTemplate, setTemplateName, setTemplateOptions, setTemplateOptionsJSString, setTitle, setToolTip, setValign, setViewAuthz, setViewPath, setViewStatus, setWidth, setWrapperCssClasses, setWrapperStyle, skipLifecycle
getExpressionGraph, getPropertyExpression, getPropertyExpressions, setExpressionGraph, setPropertyExpressions
copy, dataDictionaryPostProcessing, getComponentCode, getNamespaceCode, setComponentCode, setNamespaceCode
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getHeaderText, setHeaderText, setRenderFooter
getEnterKeyAction, getFooter, getHeader, getInstructionalMessage, getLayoutManager, getValidationMessages, isProcessRemoteFieldHolders, setEnterKeyAction, setFooter, setHeader, setInstructionalMessage, setLayoutManager, setValidationMessages, sortItems
addAriaAttribute, addDataAttribute, addScriptDataAttribute, addStyleClass, addWrapperCssClass, appendToStyle, getAdditionalComponentsToRefresh, getAdditionalComponentsToRefreshJs, getAdditionalCssClasses, getAdditionalTemplates, getAlign, getAriaAttributes, getAriaAttributesAsString, getCanCopyOnReadOnly, getCellWidth, getColSpan, getComponentModifiers, getComponentSecurity, getConditionalRefresh, getConditionalRefreshConditionJs, getConditionalRefreshControlNames, getContext, getCssClasses, getCssGridSizes, getDataAttributes, getEventHandlerScript, getExcludeIf, getExcludeUnless, getFieldsToSendOnRefresh, getFinalizeMethodAdditionalArguments, getFinalizeMethodInvoker, getFinalizeMethodToCall, getLibraryCssClasses, getMethodToCallOnRefresh, getOrder, getPostRenderContent, getPreRenderContent, getProgressiveDisclosureConditionJs, getProgressiveDisclosureControlNames, getProgressiveRender, getPropertyReplacerComponents, getPropertyReplacers, getReadOnly, getRefreshTimer, getRefreshWhenChangedPropertyNames, getRenderedHtmlOutput, getRequired, getRole, getRowSpan, getScriptDataAttributes, getScriptDataAttributesJs, getSimpleDataAttributes, getStyle, getStyleClassesAsString, getTemplate, getTemplateName, getTemplateOptions, getTemplateOptionsJSString, getTitle, getToolTip, getValign, getWidth, getWrapperCssClasses, getWrapperStyle, isDisableSessionPersistence, isDisclosedByAction, isForceSessionPersistence, isHidden, isOmitFromFormPost, isProgressiveRenderAndRefresh, isProgressiveRenderViaAJAX, isRefreshedByAction, isRendered, isResetDataOnRefresh, isRetrieveViaAjax, isSelfRendered, setAdditionalComponentsToRefresh, setAdditionalCssClasses, setAlign, setAriaAttributes, setCanCopyOnReadOnly, setCellWidth, setColSpan, setComponentModifiers, setComponentSecurity, setConditionalRefresh, setContext, setCssClasses, setCssGridSizes, setDataAttributes, setDisableSessionPersistence, setDisclosedByAction, setFieldsToSendOnRefresh, setForceSessionPersistence, setHidden, setLibraryCssClasses, setOmitFromFormPost, setOrder, setPostRenderContent, setPreRenderContent, setProgressiveRender, setProgressiveRenderAndRefresh, setProgressiveRenderViaAJAX, setPropertyReplacers, setReadOnly, setRefreshedByAction, setRefreshTimer, setRefreshWhenChangedPropertyNames, setRenderedHtmlOutput, setRequired, setResetDataOnRefresh, setRetrieveViaAjax, setRole, setRowSpan, setScriptDataAttributes, setSelfRendered, setStyle, setTemplate, setTemplateName, setTemplateOptions, setTemplateOptionsJSString, setTitle, setToolTip, setValign, setViewStatus, setWidth, setWrapperCssClasses, setWrapperStyle
getExpressionGraph, getPropertyExpression, getPropertyExpressions, setExpressionGraph, setPropertyExpressions
dataDictionaryPostProcessing, getComponentCode, getNamespaceCode
checkMutable, getContainerIdSuffix, getId, getPhasePathMapping, getViewPath, getViewStatus, isFinal, isInitialized, isModelApplied, isMutable, isRender, notifyCompleted, performApplyModel, pushAllToContext, pushObjectToContext, setContainerIdSuffix, setId, setPhasePathMapping, setRender, setViewPath, skipLifecycle
getOnBlurScript, getOnChangeScript, getOnClickScript, getOnCloseScript, getOnDblClickScript, getOnDocumentReadyScript, getOnFocusScript, getOnInputScript, getOnKeyDownScript, getOnKeyPressScript, getOnKeyUpScript, getOnLoadScript, getOnMouseDownScript, getOnMouseMoveScript, getOnMouseOutScript, getOnMouseOverScript, getOnMouseUpScript, getOnSubmitScript, getOnUnloadScript, setOnBlurScript, setOnChangeScript, setOnClickScript, setOnCloseScript, setOnDblClickScript, setOnDocumentReadyScript, setOnFocusScript, setOnInputScript, setOnKeyDownScript, setOnKeyPressScript, setOnKeyUpScript, setOnLoadScript, setOnMouseDownScript, setOnMouseMoveScript, setOnMouseOutScript, setOnMouseOverScript, setOnMouseUpScript, setOnSubmitScript, setOnUnloadScript
getHelp, getHelpTitle, setHelp, setTooltipOfComponent
public GroupBase()
public void performInitialization(Object model)
Where 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 LifecycleElement
performInitialization
in class ContainerBase
model
- - object instance containing the view dataComponentDefaultInitializeTask
public void afterEvaluateExpression()
In general, this method is preferred to LifecycleElement.performApplyModel(Object, LifecycleElement)
for populating model data via code, since it is called before client-side state is synchronize.
afterEvaluateExpression
in interface Component
afterEvaluateExpression
in class ComponentBase
public void performFinalize(Object model, LifecycleElement parent)
Here final preparations can be made based on the updated view state.
performFinalize
in interface LifecycleElement
performFinalize
in class ContainerBase
model
- - top level object containing the dataparent
- - parent componentprotected void setupValidationScripts(GroupBase.ACTION_VALIDATION_COMPONENTS... componentsToValidate)
componentsToValidate
- the list of components with actions to validateprotected String buildInputFieldValidationActionScript(List<InputField> allInputFields, List<String> excludedFields)
allInputFields
- all other input fields that might have validation constraintsexcludedFields
- fields that shouldn't be part of the validation scriptprotected boolean validateInputField(InputField inputField)
inputField
- the field to check for validationprotected void setNestedComponentId(Component component, String newId)
component
- component to adjust ID fornewId
- public Set<Class<? extends Component>> getSupportedComponents()
Set
of Component
classes that may be placed
into the container
If an empty or null list is returned, it is assumed the container supports all components. The returned set will be used by dictionary validators and allows renders to make assumptions about the contained components
getSupportedComponents
in interface Container
public String getComponentTypeName()
This is used within the rendering layer to pass the component instance into the template. The component instance is exported under the name given by this method.
getComponentTypeName
in interface Component
public String getFieldBindByNamePrefix()
DataField
instances
As opposed to setting the bindingPrefix on each attribute field instance, it can be set here for the group. During initialize the string will then be set on each attribute field instance if the bindingPrefix is blank and not a form field
getFieldBindByNamePrefix
in interface Group
public void setFieldBindByNamePrefix(String fieldBindByNamePrefix)
setFieldBindByNamePrefix
in interface Group
public String getFieldBindingObjectPath()
InputField
instances
When the attributes of the group belong to a object whose path is different from the default then this property can be given to set each of the attributes instead of setting the model path on each one. The object path can be overridden at the attribute level. The object path is set to the fieldBindingObjectPath during the initialize phase.
getFieldBindingObjectPath
in interface Group
BindingInfo.getBindingObjectPath()
public void setFieldBindingObjectPath(String fieldBindingObjectPath)
setFieldBindingObjectPath
in interface Group
public Disclosure getDisclosure()
getDisclosure
in interface Group
public void setDisclosure(Disclosure disclosure)
setDisclosure
in interface Group
public Scrollpane getScrollpane()
getScrollpane
in interface Group
public void setScrollpane(Scrollpane scrollpane)
setScrollpane
in interface Group
public List<? extends Component> getItems()
List
of Component
instances that are held by
the container
Contained components are rendered within the section template by calling
the associated LayoutManager
.
getItems
in interface Container
getItems
in class ContainerBase
public void setItems(List<? extends Component> items)
setItems
in interface Container
setItems
in class ContainerBase
items
- list of components to set in containerpublic String getWrapperTag()
getWrapperTag
in interface Group
public void setWrapperTag(String wrapperTag)
Group
setWrapperTag
in interface Group
getWrapperTag()
protected boolean isAjaxDisclosureGroup()
public void completeValidation(ValidationTrace tracer)
completeValidation
in interface Component
completeValidation
in class ContainerBase
tracer
- Record of component's locationpublic boolean isRenderLoading()
isRenderLoading
in interface Group
Copyright © 2005–2015 The Kuali Foundation. All rights reserved.