Class View
- All Implemented Interfaces:
Serializable,Cloneable,Copyable,DictionaryBean,UifDictionaryBean,Component,Ordered,ScriptEventSupport,Container,LifecycleElement,Helpable,org.springframework.core.Ordered
- Direct Known Subclasses:
FormView
The View component ties together all the components and configuration of the User Interface for a piece of functionality. In Rice applications the view is typically associated with a Document instance.
The view template lays out the common header, footer, and navigation for the related pages. In addition the view renders the HTML head element bringing in common script files and style sheets, along with optionally rendering a form element for pages that need to post data back to the server.
Configuration of UIF features such as model validation is also done through the View
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
- See Also:
-
Field Summary
FieldsFields inherited from class org.kuali.rice.krad.uif.component.ComponentBase
templateOptionsFields inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
componentCodeFields inherited from interface org.kuali.rice.krad.uif.component.Ordered
INITIAL_ORDER_VALUEFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddViewTemplate(String template) Adds a template to the views include list.voidNo-op implementation.voidInvoked to produce a ViewIndex of the current view's componentsclone()OverrideObject.clone()to assign the public modifier.voidcompleteValidation(ValidationTrace tracer) Validates different requirements of component compiling a series of reports detailing information on errors found in the component.Map of strings that flag what actions can be taken in the UI.Declares additional CSS files that should be included with the View.List of additional link tags that should be included with the View in the html head.List of additional meta tags that should be included with the View in the html head tag.Declares additional script files that should be included with the View.Footer for the application containing the view.Header for the application containing the view.Title text to be displayed on browser tab.Authorizer that should be used for the View instanceThe View's breadcrumbItem defines settings for the breadcrumb which appears in the breadcrumb list for this view.Gets all breadcrumb items related to this view's parent location.The breadcrumbOptions for this view.Breadcrumb widget used for displaying homeward path and historyBuild footer for the application containing the view.The name for the component typeReturns the list ofgetContentContainerCssClasses()as a concatenated string (each class is separated by a space).List of CSS style classes that will be applied to a div that wraps the content.Iterates through the contained page items and returns the Page that matches the set current page id or the first page in the case of a single page view.The id for the page within the view that should be displayed in the UI.For View types that work primarily with one nested object of the form (for instance document, or bo) the default binding object path can be set for each of the views DataBinding components.Provide a list of dialog groups associated with this view.Map of edit modes that enabled for the view.Specifies what page should be rendered by default.Map that contains expressions to evaluate and make available as variables for conditional expressions within the view.Class<?> Class of the Form that should be used with the View instance.Growls widget which sets up global settings for the growls used in this view and its pages.getItems()ListofComponentinstances that are held by the containerNamespace code the view should be associated with.NavigationGroup instance for the Viewinvalid input: '<'Configures the concrete classes that will be used for properties in the form object graph that have an abstract or interface type.getPage()For single paged views (isSinglePageView(), gives the page Group the view should render.Getter for returning the view's items and page for inclusion in the pre-process phase.The parentLocation defines urls that represent the parent of a View in a conceptial site hierarchy.The pathBasedBreadcrumbs for this View.intScript that is executed at the beginning of page load (before any other script).Returns the general context that is available before the apply model phase (during the initialize phase)PresentationController that should be used for the View instance.Class<? extends RequestAuthorizationCache> Configures behavior that should occur when a session timeout occurs on the view.Gets the stateMapping.The stateObject's binding path, this will be used along with the StateMapping's statePropertyName to determine what field in the model state information is stored in for this view.SetofComponentclasses that may be placed into the containergetTheme()The theme which contains stylesheets for this view.TopGroup is an optional group of content that appears above the breadcrumbs and view header.Creates theViewHelperServiceassociated with the ViewClass<? extends ViewHelperService> Class name of the ViewHelperService that handles the various phases of the Views lifecycle.Holds field indexes of the View instance for retrieval.View name provides an identifier for a view within a type.Map of parameters from the request that set view options, used to rebuild the view on each postList of templates that are used to render the view.View type name the view is associated with the view instanceprotected voidHelper method to set the view's load script to open a dialog.protected voidWithout this script dialogs might be associated with a non visible action (i.e. inside a dropdown menu).booleanIndicates whether the form should be validated for dirtyness.booleanEnables functionality to bust the browsers cache by appending an unique cache key.booleanIndicates whether the browser autocomplete functionality should be disabled for the entire form (adds autocomplete="off").booleanWhether to use growls to show messages - info, warning and errorbooleanIndicates whether the default sections specified in the page items list should be included for this view.booleanIndicates whether the form (model) associated with the view should be stored in the user session.booleanIndicates whether the View only has a single page Group or contains multiple page Group instances.booleanIf true, the applicationFooter will become sticky (fixed to bottom of window).booleanSet to true to make the applicationHeader sticky (fixed to top of window)booleanIf true, the breadcrumb widget will be sticky (fixed to top of window).booleanIf true, the view footer will become sticky (fixed to bottom of window).booleanIf true, the ViewHeader for this view will be sticky (fixed to top of window).booleanIf true, the top group will be sticky (fixed to top of window).booleanIndicates whether the view allows read only fields to be specified on the request URL which will override the view setting.booleanReturns whether the current view supports displayingKualiCode's name as additional display valuebooleanWhen true, this view will use a unified header - the page header will be omitted and its title will be used in the ViewHeader supportTitle property (dynamically updated on page change).booleanTrue if the libraryCssClasses set on components will be output to their class attribute, false otherwise.voidReceive notification that a lifecycle phase, and all successor phases, have been completed on this component.voidperformApplyModel(Object model, LifecycleElement parent) The following updates are done here: Invoke expression evaluation on view theme Invoke theme to configure defaultsvoidperformFinalize(Object model, LifecycleElement parent) The following is performed: Adds to its document ready script the setupValidator js function for setting up the validator for this view 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 renderedvoidperformInitialization(Object model) The following initialization is performed: If a single paged view, set items in page group and put the page in the items list IfViewSessionPolicy.enableTimeoutWarningis enabled add the session timeout dialogs to the views list of dialog groups 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 componentvoidsetActionFlags(Map<String, Boolean> actionFlags) voidsetAdditionalCssFiles(List<String> additionalCssFiles) voidsetAdditionalHeadLinks(List<HeadLink> additionalHeadLinks) voidsetAdditionalMetaTags(List<MetaTag> additionalMetaTags) voidsetAdditionalScriptFiles(List<String> additionalScriptFiles) voidsetApplicationFooter(Group applicationFooter) voidsetApplicationHeader(Header applicationHeader) voidsetApplicationTitleText(String applicationTitleText) voidsetApplyDirtyCheck(boolean applyDirtyCheck) voidsetAuthorizer(ViewAuthorizer authorizer) voidsetAuthorizerClass(Class<? extends ViewAuthorizer> authorizerClass) Setter for the view's authorizer by classvoidsetBreadcrumbItem(BreadcrumbItem breadcrumbItem) voidsetBreadcrumbOptions(BreadcrumbOptions breadcrumbOptions) voidsetBreadcrumbs(Breadcrumbs breadcrumbs) voidsetBuildFooter(Group buildFooter) voidsetContentContainerCssClasses(List<String> contentContainerCssClasses) voidsetCurrentPageId(String currentPageId) voidsetDefaultBindingObjectPath(String defaultBindingObjectPath) voidsetDialogs(List<Group> dialogs) voidsetDisableBrowserCache(boolean disableBrowserCache) voidsetDisableNativeAutocomplete(boolean disableNativeAutocomplete) voidsetEditModes(Map<String, Boolean> editModes) voidsetEntryPageId(String entryPageId) voidsetExpressionVariables(Map<String, String> expressionVariables) voidsetFormClass(Class<?> formClass) voidsetGrowlMessagingEnabled(boolean growlMessagingEnabled) enable or disable showing of messages using growlsvoidvoidSetter for the containers list of componentsvoidsetMergeWithPageItems(boolean mergeWithPageItems) voidsetNamespaceCode(String namespaceCode) Setter for the bean's associated namespace codevoidsetNavigation(Group navigation) voidsetNavigationBlockUI(BlockUI navigationBlockUI) Set the navigation BlockUI used with single page blocking (such as full page loading/saving)protected voidsetNestedComponentId(Component component, String newId) Helper method for setting a new ID for the nested componentsvoidsetObjectPathToConcreteClassMapping(Map<String, Class<?>> objectPathToConcreteClassMapping) voidvoidsetParentLocation(ParentLocation parentLocation) voidsetPathBasedBreadcrumbs(List<BreadcrumbItem> pathBasedBreadcrumbs) The pathBasedBreadcrumbs for this View.voidsetPersistFormToSession(boolean persistFormToSession) voidsetPreloadPoolSize(int preloadPoolSize) voidsetPreLoadScript(String preLoadScript) voidsetPresentationController(ViewPresentationController presentationController) voidsetPresentationControllerClass(Class<? extends ViewPresentationController> presentationControllerClass) Setter for the view's presentation controller by classvoidsetRefreshBlockUI(BlockUI refreshBlockUI) Set the refresh BlockUI used with single element blocking (such as ajax based element loading/updates)voidsetRequestAuthorizationCacheClass(Class<? extends RequestAuthorizationCache> requestAuthorizationCacheClass) voidsetSessionPolicy(ViewSessionPolicy sessionPolicy) voidsetSinglePageView(boolean singlePageView) voidsetStateMapping(StateMapping stateMapping) voidsetStateObjectBindingPath(String stateObjectBindingPath) The stateObject's binding path, this will be used along with the StateMapping's statePropertyName to determine what field in the model state information is stored in for this view.voidsetStickyApplicationFooter(boolean stickyApplicationFooter) voidsetStickyApplicationHeader(boolean stickyApplicationHeader) voidsetStickyBreadcrumbs(boolean stickyBreadcrumbs) voidsetStickyFooter(boolean stickyFooter) voidsetStickyHeader(boolean stickyHeader) voidsetStickyTopGroup(boolean stickyTopGroup) voidsetSupportsRequestOverrideOfReadOnlyFields(boolean supportsRequestOverrideOfReadOnlyFields) voidvoidsetTopGroup(Group topGroup) voidsetTranslateCodesOnReadOnlyDisplay(boolean translateCodesOnReadOnlyDisplay) Indicates whether the Name of the Code should be displayed when a property is of typeKualiCodevoidsetUnifiedHeader(boolean unifiedHeader) voidsetUseLibraryCssClasses(boolean useLibraryCssClasses) voidsetViewHelperService(ViewHelperService viewHelperService) voidsetViewHelperServiceClass(Class<? extends ViewHelperService> viewHelperServiceClass) Setter for theViewHelperServiceclass name Also initializes the viewHelperServicevoidsetViewName(String viewName) voidsetViewRequestParameters(Map<String, String> viewRequestParameters) voidsetViewTemplates(List<String> viewTemplates) Setter for the the list of template names that should be included to render the viewvoidsetViewTypeName(UifConstants.ViewType viewTypeName) voidPerforms sorting of the container items based on the order propertyMethods inherited from class org.kuali.rice.krad.uif.container.ContainerBase
getAdditionalTemplates, getDefaultItemPosition, getEnterKeyAction, getFooter, getHeader, getHeaderText, getHelp, getHelpTitle, getInstructionalMessage, getInstructionalText, getLayoutManager, getValidationMessages, isProcessRemoteFieldHolders, setDefaultItemPosition, setEnterKeyAction, setFooter, setHeader, setHeaderText, setHelp, setInstructionalMessage, setInstructionalText, setLayoutManager, setRenderFooter, setRenderHeader, setTooltipOfComponent, setValidationMessagesMethods inherited from class org.kuali.rice.krad.uif.component.ComponentBase
addAriaAttribute, addDataAttribute, addScriptDataAttribute, addStyleClass, addWrapperCssClass, appendToStyle, checkMutable, 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, 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, skipLifecycleMethods inherited from class org.kuali.rice.krad.datadictionary.uif.UifDictionaryBeanBase
getExpressionGraph, getPropertyExpression, getPropertyExpressions, setExpressionGraph, setPropertyExpressionsMethods inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
copy, dataDictionaryPostProcessing, getComponentCode, setComponentCodeMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.kuali.rice.krad.uif.component.Component
addAriaAttribute, addDataAttribute, addScriptDataAttribute, addStyleClass, addWrapperCssClass, appendToStyle, getAdditionalComponentsToRefresh, getAdditionalComponentsToRefreshJs, getAdditionalCssClasses, 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, setWrapperStyleMethods inherited from interface org.kuali.rice.krad.datadictionary.DictionaryBean
dataDictionaryPostProcessing, getComponentCodeMethods inherited from interface org.kuali.rice.krad.uif.util.LifecycleElement
checkMutable, getContainerIdSuffix, getId, getPhasePathMapping, getViewPath, getViewStatus, isFinal, isInitialized, isModelApplied, isMutable, isRender, pushAllToContext, pushObjectToContext, setContainerIdSuffix, setId, setPhasePathMapping, setRender, setViewPath, skipLifecycleMethods inherited from interface org.kuali.rice.krad.uif.component.ScriptEventSupport
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, setOnUnloadScriptMethods inherited from interface org.kuali.rice.krad.datadictionary.uif.UifDictionaryBean
getExpressionGraph, getPropertyExpression, getPropertyExpressions, setExpressionGraph, setPropertyExpressions
-
Field Details
-
viewIndex
-
applyDirtyCheck
protected boolean applyDirtyCheck
-
-
Constructor Details
-
View
public View()
-
-
Method Details
-
performInitialization
The following initialization is performed:- If a single paged view, set items in page group and put the page in the items list
- If
ViewSessionPolicy.enableTimeoutWarningis enabled add the session timeout dialogs to the views list of dialog groups
- Sorts the containers list of components
- Initializes the instructional field if necessary
- Initializes LayoutManager
- Invoke performInitialize on component modifiers
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.
- Specified by:
performInitializationin interfaceLifecycleElement- Overrides:
performInitializationin classContainerBase- Parameters:
model- - object instance containing the view data- See Also:
-
initializeDialogLoadScript
Helper method to set the view's load script to open a dialog.- Parameters:
form- the form containing data
-
initializeDialogReclocationScript
protected void initializeDialogReclocationScript()Without this script dialogs might be associated with a non visible action (i.e. inside a dropdown menu). This would cause the dialog not being displayed. To ensure that all dialog are able to be displayed the DIVs of the dialogs are moved to a common location. -
afterEvaluateExpression
public void afterEvaluateExpression()No-op implementation. Override for custom behavior in subclasses. Invoked by the view lifecycle after expressions are evaluated at the apply model phase.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.- Specified by:
afterEvaluateExpressionin interfaceComponent- Overrides:
afterEvaluateExpressionin classComponentBase
-
performApplyModel
The following updates are done here:- Invoke expression evaluation on view theme
- Invoke theme to configure defaults
- Specified by:
performApplyModelin interfaceLifecycleElement- Overrides:
performApplyModelin classContainerBase- Parameters:
model- - Top level object containing the data (could be the form or a top level business object, dto)parent- parent lifecycle element
-
performFinalize
The following is performed:- Adds to its document ready script the setupValidator js function for setting up the validator for this view
- Sets the headerText of the header Group if it is blank
- Set the messageText of the summary Message if it is blank
- Finalizes LayoutManager
- 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
Here final preparations can be made based on the updated view state.
- Specified by:
performFinalizein interfaceLifecycleElement- Overrides:
performFinalizein classContainerBase- Parameters:
model- - top level object containing the dataparent- - parent component
-
setNestedComponentId
Helper method for setting a new ID for the nested components- Parameters:
component- component to adjust ID fornewId-
-
notifyCompleted
Receive notification that a lifecycle phase, and all successor phases, have been completed on this component.- Specified by:
notifyCompletedin interfaceLifecycleElement- Overrides:
notifyCompletedin classComponentBase- Parameters:
phase- The completed view lifecycle phase
-
getBreadcrumbItems
Gets all breadcrumb items related to this view's parent location.- Returns:
- breadcrumb items
-
getSupportedComponents
SetofComponentclasses that may be placed into the containerIf 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
- Returns:
- Set component classes
-
getComponentTypeName
The name for the component typeThis 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.
- Returns:
- String type name
-
getCurrentPage
Iterates through the contained page items and returns the Page that matches the set current page id or the first page in the case of a single page view.- Returns:
- page group instance
-
getPagesForPreprocessing
Getter for returning the view's items and page for inclusion in the pre-process phase.Note this is necessary so we get IDs assigned for all the pages during the pre-process phase. For other phases, only the current page is picked up.
- Returns:
- list of components to include for the pre-process phase
-
sortItems
public void sortItems()Performs sorting of the container items based on the order property- Specified by:
sortItemsin interfaceContainer- Overrides:
sortItemsin classContainerBase
-
getNamespaceCode
Namespace code the view should be associated with.The namespace code is used within the framework in such places as permission checks and parameter retrieval
- Specified by:
getNamespaceCodein interfaceDictionaryBean- Overrides:
getNamespaceCodein classDictionaryBeanBase- Returns:
- namespace code
- See Also:
-
setNamespaceCode
Description copied from class:DictionaryBeanBaseSetter for the bean's associated namespace code- Overrides:
setNamespaceCodein classDictionaryBeanBase- Parameters:
namespaceCode-- See Also:
-
getViewName
View name provides an identifier for a view within a type. That is if a set of View instances have the same values for the properties that are used to retrieve them by their type, the name can be given to further qualify the view that should be retrieved.A view type like the LookupView might have several views for the same object class, but one that is the 'default' lookup and another that is the 'advanced' lookup. Therefore the name on the first could be set to 'default', and likewise the name for the second 'advanced'
- Returns:
- name of view
-
setViewName
- See Also:
-
isUnifiedHeader
public boolean isUnifiedHeader()When true, this view will use a unified header - the page header will be omitted and its title will be used in the ViewHeader supportTitle property (dynamically updated on page change).- Returns:
- true if using a unified header
-
setUnifiedHeader
public void setUnifiedHeader(boolean unifiedHeader) - See Also:
-
getTopGroup
TopGroup is an optional group of content that appears above the breadcrumbs and view header.- Returns:
- the topGroup component
-
setTopGroup
- See Also:
-
getApplicationHeader
Header for the application containing the view.When deploying outside a portal, the application header and footer property can be configured to display a consistent header/footer across all views. Here application logos, menus, login controls and so on can be rendered
- Returns:
- application header
-
setApplicationHeader
- See Also:
-
getApplicationTitleText
Title text to be displayed on browser tab.- Returns:
-
setApplicationTitleText
- See Also:
-
isStickyTopGroup
public boolean isStickyTopGroup()If true, the top group will be sticky (fixed to top of window).- Returns:
- true if the top group is sticky, false otherwise
-
setStickyTopGroup
public void setStickyTopGroup(boolean stickyTopGroup) - See Also:
-
isStickyBreadcrumbs
public boolean isStickyBreadcrumbs()If true, the breadcrumb widget will be sticky (fixed to top of window).- Returns:
- true if breadcrumbs are sticky, false otherwise
-
setStickyBreadcrumbs
public void setStickyBreadcrumbs(boolean stickyBreadcrumbs) - See Also:
-
isStickyHeader
public boolean isStickyHeader()If true, the ViewHeader for this view will be sticky (fixed to top of window).- Returns:
- true if the header is sticky, false otherwise
-
setStickyHeader
public void setStickyHeader(boolean stickyHeader) - See Also:
-
isStickyApplicationHeader
public boolean isStickyApplicationHeader()Set to true to make the applicationHeader sticky (fixed to top of window)- Returns:
- true if applicationHeader is sticky, false otherwise
-
setStickyApplicationHeader
public void setStickyApplicationHeader(boolean stickyApplicationHeader) - See Also:
-
getContentContainerCssClasses
List of CSS style classes that will be applied to a div that wraps the content.Wrapping the content gives the ability to move between a fluid width container or a fixed width container. The div is also wraps content inside sticky elements (header and footer), so visual treatment can be given to the full width of the screen while restricting the area of the content.
In Bootstrap, use 'container-fluid' for a fluid width container, and 'container' for a fixed width container.
- Returns:
- List of css classes to apply to content wrapper div
-
setContentContainerCssClasses
- See Also:
-
getContentContainerClassesAsString
Returns the list ofgetContentContainerCssClasses()as a concatenated string (each class is separated by a space).- Returns:
- String of content css classes
-
getEntryPageId
Specifies what page should be rendered by default. This is the page that will be rendered when the View is first rendered or when the current page is not set- Returns:
- id of the page to render by default
-
setEntryPageId
- See Also:
-
getCurrentPageId
The id for the page within the view that should be displayed in the UI. Other pages of the view will not be rendered.If current page id is not set, it is set to the configured entry page or first item in list id
- Returns:
- id of the page that should be displayed
-
setCurrentPageId
- See Also:
-
getFormClass
Class of the Form that should be used with the View instance.The form is the top level object for all the view's data and is used to present and accept data in the user interface. All form classes should extend UifFormBase
- Returns:
- class for the view's form
- See Also:
-
setFormClass
- See Also:
-
getDefaultBindingObjectPath
For View types that work primarily with one nested object of the form (for instance document, or bo) the default binding object path can be set for each of the views DataBinding components. If the component does not set its own binding object path it will inherit the default.- Returns:
- binding path to the object from the form
-
setDefaultBindingObjectPath
- See Also:
-
getObjectPathToConcreteClassMapping
Configures the concrete classes that will be used for properties in the form object graph that have an abstract or interface type.For properties that have an abstract or interface type, it is not possible to perform operations like getting/settings property values and getting information from the dictionary. When these properties are encountered in the object graph, this Map will be consulted to determine the concrete type to use
e.g. Suppose we have a property document.accountingLine.accountNumber and the accountingLine property on the document instance has an interface type 'AccountingLine'. We can then put an entry into this map with key 'document.accountingLine', and value 'org.kuali.rice.sampleapp.TravelAccountingLine'. When getting the property type or an entry from the dictionary for accountNumber, the TravelAccountingLine class will be used
- Returns:
- Mapinvalid input: '<'String, Class> of class implementations keyed by path
-
setObjectPathToConcreteClassMapping
public void setObjectPathToConcreteClassMapping(Map<String, Class<?>> objectPathToConcreteClassMapping) - See Also:
-
getAdditionalScriptFiles
Declares additional script files that should be included with the View.These files are brought into the HTML page along with common script files configured for the Rice application. Each entry contain the path to the CSS file, either a relative path, path from web root, or full URI
e.g. '/krad/scripts/myScript.js', '../scripts/myScript.js', 'http://my.edu/web/myScript.js'
- Returns:
- script file locations
-
setAdditionalScriptFiles
- See Also:
-
getAdditionalCssFiles
Declares additional CSS files that should be included with the View.These files are brought into the HTML page along with common CSS files configured for the Rice application. Each entry should contain the path to the CSS file, either a relative path, path from web root, or full URI
e.g. '/krad/css/stacked-view.css', '../css/stacked-view.css', 'http://my.edu/web/stacked-view.css'
- Returns:
- CSS file locations
-
setAdditionalCssFiles
- See Also:
-
getAdditionalHeadLinks
List of additional link tags that should be included with the View in the html head.- Returns:
- headlink objects
-
setAdditionalHeadLinks
- See Also:
-
getAdditionalMetaTags
List of additional meta tags that should be included with the View in the html head tag.- Returns:
- additionalMetaTags
-
setAdditionalMetaTags
- See Also:
-
isUseLibraryCssClasses
public boolean isUseLibraryCssClasses()True if the libraryCssClasses set on components will be output to their class attribute, false otherwise.- Returns:
- true if using libraryCssClasses on components
-
setUseLibraryCssClasses
public void setUseLibraryCssClasses(boolean useLibraryCssClasses) - See Also:
-
getViewTemplates
List of templates that are used to render the view.This list will be populated by unique template names as the components of the view are being processed. Additional templates can be added in the view configuration if desired. At the beginning of the the view rendering, each template in the list will then be included or processed by the template language
Note the user of this depends on the template language being used for rendering. Some languages might require including the template for each component instance (for example JSP templates). While others might simply include markup that is then available for rendering each component instance (for example FreeMarker which has a macro for each component that the template defines)
- Returns:
- list of template names that should be included for rendering the view
-
addViewTemplate
Adds a template to the views include list.- Parameters:
template- path to template to add
-
setViewTemplates
Setter for the the list of template names that should be included to render the view- Parameters:
viewTemplates-
-
getViewTypeName
View type name the view is associated with the view instanceViews that share common features and functionality can be grouped by the view type. Usually view types extend the
Viewclass to provide additional configuration and to set defaults. View types can also implement theViewTypeServiceto add special indexing and retrieval of views- Returns:
- view type name for the view
-
setViewTypeName
- See Also:
-
getViewHelperServiceClass
Class name of the ViewHelperService that handles the various phases of the Views lifecycle.- Returns:
- Class for the spring bean
- See Also:
-
setViewHelperServiceClass
Setter for theViewHelperServiceclass name Also initializes the viewHelperService- Parameters:
viewHelperServiceClass-
-
getViewHelperService
Creates theViewHelperServiceassociated with the View- Returns:
- ViewHelperService instance
-
setViewHelperService
- See Also:
-
clearIndex
public void clearIndex()Invoked to produce a ViewIndex of the current view's components -
getViewIndex
Holds field indexes of the View instance for retrieval.- Returns:
- ViewIndex instance
-
getViewRequestParameters
Map of parameters from the request that set view options, used to rebuild the view on each postViews can be configured by parameters. These might impact which parts of the view are rendered or how the view behaves. Generally these would get passed in when a new view is requested (by request parameters). These will be used to initially populate the view properties. In addition, on a post the view will be rebuilt and properties reset again by the allow request parameters.
Example parameter would be for MaintenaceView whether a New, Edit, or Copy was requested (maintenance mode)
- Returns:
-
setViewRequestParameters
- See Also:
-
isPersistFormToSession
public boolean isPersistFormToSession()Indicates whether the form (model) associated with the view should be stored in the user session.The form class (or model) is used to hold the data that backs the view along with the built view object. Storing the form instance in session allows many things:
- Data does not need to be rebuilt for each server request (for example a collection)
- Data that does not need to go to the user can remain on the form, reducing the size of the response and improving security
- Data can be keep around in a 'pre-save' state. When requested by the user changes can then be persisted to the database
- Certain information about the view that was rendered, such as input fields, collection paths, and refresh components can be kept on the form to support UI interaction
Note all forms will be cleared when the user session expires (based on the rice configuration). In addition, the framework enables clear points on certain actions to remove the form when it is no longer needed
- Returns:
- true if the form should be stored in the user session, false if only request based
-
setPersistFormToSession
public void setPersistFormToSession(boolean persistFormToSession) - See Also:
-
getSessionPolicy
Configures behavior that should occur when a session timeout occurs on the view.- Returns:
- view session policy instance
-
setSessionPolicy
- See Also:
-
getPreloadPoolSize
public int getPreloadPoolSize() -
setPreloadPoolSize
public void setPreloadPoolSize(int preloadPoolSize) -
getPresentationController
PresentationController that should be used for the View instance.The presentation controller is consulted to determine component (group, field) state such as required, read-only, and hidden. The presentation controller does not take into account user permissions. The presentation controller can also output action flags and edit modes that will be set onto the view instance and can be referred to by conditional expressions
- Returns:
- PresentationController
-
setPresentationController
- See Also:
-
setPresentationControllerClass
public void setPresentationControllerClass(Class<? extends ViewPresentationController> presentationControllerClass) Setter for the view's presentation controller by class- Parameters:
presentationControllerClass-
-
getAuthorizer
Authorizer that should be used for the View instanceThe authorizer class is consulted to determine component (group, field) state such as required, read-only, and hidden based on the users permissions. It typically communicates with the Kuali Identity Management system to determine roles and permissions. It is used with the presentation controller and dictionary conditional logic to determine the final component state. The authorizer can also output action flags and edit modes that will be set onto the view instance and can be referred to by conditional expressions
- Returns:
- Authorizer
-
setAuthorizer
- See Also:
-
setAuthorizerClass
Setter for the view's authorizer by class- Parameters:
authorizerClass-
-
getActionFlags
Map of strings that flag what actions can be taken in the UI.These can be used in conditional expressions in the dictionary or by other UI logic
- Returns:
- action flags
-
setActionFlags
- See Also:
-
getEditModes
Map of edit modes that enabled for the view.These can be used in conditional expressions in the dictionary or by other UI logic
- Returns:
- edit modes
-
setEditModes
- See Also:
-
getRequestAuthorizationCacheClass
-
setRequestAuthorizationCacheClass
public void setRequestAuthorizationCacheClass(Class<? extends RequestAuthorizationCache> requestAuthorizationCacheClass) -
getExpressionVariables
Map that contains expressions to evaluate and make available as variables for conditional expressions within the view.Each Map entry contains one expression variables, where the map key gives the name for the variable, and the map value gives the variable expression. The variables expressions will be evaluated before conditional logic is run and made available as variables for other conditional expressions. Variable expressions can be based on the model and any object contained in the view's context
- Returns:
- variable expressions
-
setExpressionVariables
- See Also:
-
isSinglePageView
public boolean isSinglePageView()Indicates whether the View only has a single page Group or contains multiple page Group instances.In the case of a single page it is assumed the group's items list contains the section groups for the page, and the page itself is given by the page property (
getPage(). This is for convenience of configuration and also can drive other configuration like styling- Returns:
- true if the view only contains one page group, false if it contains multple pages
-
setSinglePageView
public void setSinglePageView(boolean singlePageView) - See Also:
-
isMergeWithPageItems
public boolean isMergeWithPageItems()Indicates whether the default sections specified in the page items list should be included for this view. This only applies to single paged views.- Returns:
- true if the view should contain the default sections specified in the page
-
setMergeWithPageItems
public void setMergeWithPageItems(boolean mergeWithPageItems) - See Also:
-
getPage
For single paged views (isSinglePageView(), gives the page Group the view should render. The actual items for the page is taken from the group's items list (getItems(), and set onto the give page group. This is for convenience of configuration.- Returns:
- page group for single page views
-
setPage
- See Also:
-
getItems
ListofComponentinstances that are held by the containerContained components are rendered within the section template by calling the associated
LayoutManager.- Specified by:
getItemsin interfaceContainer- Specified by:
getItemsin classContainerBase- Returns:
- List component instances
-
setItems
Setter for the containers list of components- Specified by:
setItemsin interfaceContainer- Specified by:
setItemsin classContainerBase- Parameters:
items-
-
getDialogs
@ViewLifecycleRestriction(value="FINALIZE", condition="!ajaxRequest || (ajaxReturnType eq \'update-view\') || (ajaxReturnType eq \'update-page\')") public List<Group> getDialogs()Provide a list of dialog groups associated with this view.- Returns:
- List of dialog Groups
-
setDialogs
- See Also:
-
getBreadcrumbs
Breadcrumb widget used for displaying homeward path and history- Returns:
- the breadcrumbs
-
setBreadcrumbs
- Parameters:
breadcrumbs- the breadcrumbs to set
-
getBreadcrumbOptions
The breadcrumbOptions for this view.Render options set at the view level are always ignored (only apply to page level BreadcrumbOptions). BreadcrumbOptions for homewardPathBreadcrumbs, preViewBreadcrumbs, prePageBreadcrumbs, and breadcrumbOverrides are inherited by child pages unless they override them themselves.
- Returns:
- the BreadcrumbOptions for this view
-
setBreadcrumbOptions
- See Also:
-
getBreadcrumbItem
The View's breadcrumbItem defines settings for the breadcrumb which appears in the breadcrumb list for this view.- Returns:
- the breadcrumbItem
-
setBreadcrumbItem
- See Also:
-
getParentLocation
The parentLocation defines urls that represent the parent of a View in a conceptial site hierarchy.By defining a parent with these urls defined, a breadcrumb chain can be generated and displayed automatically before this View's breadcrumbItem(s). To chain multiple views, the urls must be defining viewId and controllerMapping settings instead of setting an href directly (this will end the chain). If labels are not set on parentLocations, the labels will attempt to be derived from parent views/pages breadcrumbItem and headerText - if these contain expressions which cannot be evaluated in the current context an exception will be thrown
- Returns:
- the parentLocation
-
setParentLocation
- See Also:
-
getPathBasedBreadcrumbs
The pathBasedBreadcrumbs for this View. These can only be set by the framework.- Returns:
- the path based breadcrumbs
-
setPathBasedBreadcrumbs
The pathBasedBreadcrumbs for this View.- Parameters:
pathBasedBreadcrumbs-
-
getGrowls
Growls widget which sets up global settings for the growls used in this view and its pages.- Returns:
- the growls
-
setGrowls
- Parameters:
growls- the growls to set
-
getRefreshBlockUI
- Returns:
- returns the refresh block object
-
setRefreshBlockUI
Set the refresh BlockUI used with single element blocking (such as ajax based element loading/updates)- Parameters:
refreshBlockUI-
-
isGrowlMessagingEnabled
public boolean isGrowlMessagingEnabled()Whether to use growls to show messages - info, warning and errorGrowls use the messages contained in the message map. If enabled, info messages in their entirety will be displayed in growls, for warning and error messages a growl message will notify the user that these messages exist on the page.
If this setting is disabled, it is recommended that infoMessage display be enabled for the page ValidationMessages bean in order to display relevant information to the user. Note: the growl scripts are built out in the PageGroup class.
- Returns:
- the growlMessagingEnabled
-
setGrowlMessagingEnabled
public void setGrowlMessagingEnabled(boolean growlMessagingEnabled) enable or disable showing of messages using growls- Parameters:
growlMessagingEnabled- the growlMessagingEnabled to set
-
isApplyDirtyCheck
public boolean isApplyDirtyCheck()Indicates whether the form should be validated for dirtyness.For FormView, it's necessary to validate when the user tries to navigate out of the form. If set, all the InputFields will be validated on refresh, navigate, cancel or close Action or on form unload and if dirty, displays a message and user can decide whether to continue with the action or stay on the form. For lookup and inquiry, it's not needed to validate
- Returns:
- true if dirty validation is set
-
setApplyDirtyCheck
public void setApplyDirtyCheck(boolean applyDirtyCheck) - See Also:
-
isTranslateCodesOnReadOnlyDisplay
public boolean isTranslateCodesOnReadOnlyDisplay()Returns whether the current view supports displayingKualiCode's name as additional display value- Returns:
- true if the current view supports
-
setTranslateCodesOnReadOnlyDisplay
public void setTranslateCodesOnReadOnlyDisplay(boolean translateCodesOnReadOnlyDisplay) Indicates whether the Name of the Code should be displayed when a property is of typeKualiCode- Parameters:
translateCodesOnReadOnlyDisplay- indicates whether KualiCode's name should be included.
-
isSupportsRequestOverrideOfReadOnlyFields
public boolean isSupportsRequestOverrideOfReadOnlyFields()Indicates whether the view allows read only fields to be specified on the request URL which will override the view setting.If enabled, the readOnlyFields request parameter can be sent to indicate fields that should be set read only
- Returns:
- true if read only request overrides are allowed, false if not
-
setSupportsRequestOverrideOfReadOnlyFields
public void setSupportsRequestOverrideOfReadOnlyFields(boolean supportsRequestOverrideOfReadOnlyFields) - See Also:
-
isDisableNativeAutocomplete
public boolean isDisableNativeAutocomplete()Indicates whether the browser autocomplete functionality should be disabled for the entire form (adds autocomplete="off").The browser's native autocomplete functionality can cause issues with security fields and also fields with the UIF suggest widget enabled
- Returns:
- true if the native autocomplete should be turned off for the form, false if not
-
setDisableNativeAutocomplete
public void setDisableNativeAutocomplete(boolean disableNativeAutocomplete) - See Also:
-
isDisableBrowserCache
public boolean isDisableBrowserCache()Enables functionality to bust the browsers cache by appending an unique cache key.Since response headers are unreliable for preventing caching in all browsers, the framework uses a technique for updating the URL to include an unique cache key. If the HTML 5 History API is supported a parameter can be added to the URL which causes the browser to not find the cached page when the user goes back. If not the framework falls back to using a hash key and resubmitting using script to pull the latest
- Returns:
- true if cache for the view should be disabled, false if not
-
setDisableBrowserCache
public void setDisableBrowserCache(boolean disableBrowserCache) - See Also:
-
getPreLoadScript
Script that is executed at the beginning of page load (before any other script).Many used to set server variables client side
- Returns:
- pre load script
-
setPreLoadScript
- See Also:
-
getTheme
The theme which contains stylesheets for this view.- Returns:
- ViewTheme
-
setTheme
- See Also:
-
getStateObjectBindingPath
The stateObject's binding path, this will be used along with the StateMapping's statePropertyName to determine what field in the model state information is stored in for this view. Used during View validation.- Returns:
- stateObjectBindingPath path to the object storing state information
-
setStateObjectBindingPath
The stateObject's binding path, this will be used along with the StateMapping's statePropertyName to determine what field in the model state information is stored in for this view. Used during View validation.- Parameters:
stateObjectBindingPath-
-
getStateMapping
Gets the stateMapping.The state mapping object is used to determine the state information for a view, it must include an ordered list of states, and where to find the state information for the view. A stateMapping must be set for state based validation to occur. When stateMapping information is not included, the view's model is considered stateless and all constraints will apply regardless of their state information or replacements (ie, they will function as they did in version 2.1).
- Returns:
- information needed for state based validation, if null no state based validation functionality will exist and configured constraints will apply regardless of state
- Since:
- 2.2
-
setStateMapping
- See Also:
-
getPreModelContext
Returns the general context that is available before the apply model phase (during the initialize phase)- Returns:
- context map
-
clone
Description copied from class:ComponentBaseOverrideObject.clone()to assign the public modifier.- Specified by:
clonein interfaceCopyable- Overrides:
clonein classComponentBase- Returns:
Object.clone()- Throws:
CloneNotSupportedException- IfCloneableis not implemented. This should not be possible when using this interface.- See Also:
-
completeValidation
Validates different requirements of component compiling a series of reports detailing information on errors found in the component. Used by the RiceDictionaryValidator.- Specified by:
completeValidationin interfaceComponent- Overrides:
completeValidationin classContainerBase- Parameters:
tracer- Record of component's location
-