org.kuali.rice.krad.uif.view
Class LookupView

java.lang.Object
  extended by org.kuali.rice.krad.uif.component.ConfigurableBase
      extended by org.kuali.rice.krad.uif.component.ComponentBase
          extended by org.kuali.rice.krad.uif.container.ContainerBase
              extended by org.kuali.rice.krad.uif.view.View
                  extended by org.kuali.rice.krad.uif.view.FormView
                      extended by org.kuali.rice.krad.uif.view.LookupView
All Implemented Interfaces:
Serializable, Component, Configurable, ScriptEventSupport, Container, org.springframework.core.Ordered

public class LookupView
extends FormView

View type for Maintenance documents

Supports doing a search against a data object class or performing a more advanced query. The view type is primarily made up of two groups, the search (or criteria) group and the results group. Many options are supported on the view to enable/disable certain features, like what actions are available on the search results.

Works in conjunction with LookupableImpl which customizes the view and carries out the business functionality

Author:
Kuali Rice Team (rice.collab@kuali.org)
See Also:
Serialized Form

Field Summary
protected  boolean defaultSortAscending
           
 
Fields inherited from interface org.kuali.rice.krad.uif.component.Ordered
INITIAL_ORDER_VALUE
 
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Constructor Summary
LookupView()
           
 
Method Summary
 void applyConditionalLogicForFieldDisplay()
           
 List<Component> getComponentPrototypes()
          List of components that are maintained by the component as prototypes for creating other component instances
 List<Component> getCriteriaFields()
           
 Group getCriteriaGroup()
           
 Class<?> getDataObjectClassName()
          Class name for the object the lookup applies to
 List<String> getDefaultSortAttributeNames()
           
 String getMaintenanceUrlMapping()
          String that maps to the maintenance controller for the maintenance document (if any) associated with the lookup data object class
 List<Component> getResultFields()
           
 Field getResultsActionsField()
           
 Integer getResultSetLimit()
          Retrieves the maximum number of records that will be listed as a result of the lookup search
 CollectionGroup getResultsGroup()
           
 Field getResultsReturnField()
           
 String getReturnTarget()
           
 boolean hasResultSetLimit()
          Indicates whether a result set limit has been specified for the view
protected  void initializeGroups()
           
 boolean isDefaultSortAscending()
           
 boolean isHideReturnLinks()
           
 boolean isMultipleValuesSelect()
          Indicates whether multiple values select should be enabled for the lookup
 boolean isReturnByScript()
           
 boolean isShowMaintenanceLinks()
           
 boolean isSuppressActions()
           
 void performApplyModel(View view, Object model, Component parent)
          The following updates are done here: Evaluate the progressive render condition (if set) and combine with the current render status to set the render status
 void performInitialization(View view, Object model)
          The following initialization is performed: Set the abstractTypeClasses map for the lookup object path
 void setCriteriaFields(List<Component> criteriaFields)
           
 void setCriteriaGroup(Group criteriaGroup)
           
 void setDataObjectClassName(Class<?> dataObjectClassName)
          Setter for the object class name
 void setDefaultSortAscending(boolean defaultSortAscending)
           
 void setDefaultSortAttributeNames(List<String> defaultSortAttributeNames)
           
 void setHideReturnLinks(boolean hideReturnLinks)
           
 void setMaintenanceUrlMapping(String maintenanceUrlMapping)
          Setter for the URL mapping string that will be used to build up maintenance action URLs
 void setMultipleValuesSelect(boolean multipleValuesSelect)
          Setter for the multiple values select indicator
 void setResultFields(List<Component> resultFields)
           
 void setResultsActionsField(Field resultsActionsField)
           
 void setResultSetLimit(Integer resultSetLimit)
          Setter for the result list limit
 void setResultsGroup(CollectionGroup resultsGroup)
           
 void setResultsReturnField(Field resultsReturnField)
           
 void setReturnByScript(boolean returnByScript)
          Setter for the flag to indicate that lookups will return the value by script and not a post
 void setReturnTarget(String returnTarget)
           
 void setShowMaintenanceLinks(boolean showMaintenanceLinks)
           
 void setSuppressActions(boolean suppressActions)
           
 
Methods inherited from class org.kuali.rice.krad.uif.view.FormView
getFormPostUrl, isRenderForm, isValidateClientSide, isValidateServerSide, setFormPostUrl, setRenderForm, setValidateClientSide, setValidateServerSide
 
Methods inherited from class org.kuali.rice.krad.uif.view.View
addToClientSideState, assignComponentIds, getAbstractTypeClasses, getActionFlags, getAdditionalCssFiles, getAdditionalScriptFiles, getAppendOption, getApplicationFooter, getApplicationHeader, getAuthorizer, getBreadcrumbs, getClientSideState, getComponentsForLifecycle, getComponentTypeName, getCurrentPage, getCurrentPageId, getDefaultBindingObjectPath, getEditModes, getEntryPageId, getExpressionVariables, getFormClass, getGrowls, getItems, getNavigation, getNextId, getPage, getPreLoadScript, getPresentationController, getSupportedComponents, getSupportsOnDocumentReady, getSupportsOnLoad, getSupportsOnSubmit, getTheme, getViewHelperService, getViewHelperServiceClassName, getViewIndex, getViewLabelFieldPropertyName, getViewMenuGrouping, getViewMenuLink, getViewName, getViewNamespaceCode, getViewRequestParameters, getViewStatus, getViewTypeName, index, isBreadcrumbsInApplicationHeader, isDialogMode, isFinal, isGrowlMessagingEnabled, isInitialized, isSinglePageView, isSupportsReadOnlyFieldsOverride, isTranslateCodes, isValidateDirty, performFinalize, setAbstractTypeClasses, setActionFlags, setAdditionalCssFiles, setAdditionalScriptFiles, setAppendOption, setApplicationFooter, setApplicationHeader, setAuthorizer, setAuthorizerClass, setBreadcrumbs, setBreadcrumbsInApplicationHeader, setClientSideState, setCurrentPageId, setDefaultBindingObjectPath, setDialogMode, setEditModes, setEntryPageId, setExpressionVariables, setFormClass, setGrowlMessagingEnabled, setGrowls, setItems, setNavigation, setPage, setPreLoadScript, setPresentationController, setPresentationControllerClass, setSinglePageView, setSupportsReadOnlyFieldsOverride, setTheme, setTranslateCodes, setValidateDirty, setViewHelperServiceClassName, setViewLabelFieldPropertyName, setViewMenuGrouping, setViewMenuLink, setViewName, setViewNamespaceCode, setViewRequestParameters, setViewStatus, setViewTypeName
 
Methods inherited from class org.kuali.rice.krad.uif.container.ContainerBase
getAdditionalMessageKeys, getErrorsField, getFooter, getHeader, getHelp, getInputFields, getInstructionalMessageField, getInstructionalText, getItemOrderingSequence, getLayoutManager, isFieldContainer, setAdditionalMessageKeys, setErrorsField, setFieldContainer, setFooter, setHeader, setHelp, setInstructionalMessageField, setInstructionalText, setItemOrderingSequence, setLayoutManager, setRenderFooter, setRenderHeader
 
Methods inherited from class org.kuali.rice.krad.uif.component.ComponentBase
addStyleClass, appendToStyle, getAlign, getColSpan, getComponentModifiers, getComponentOptions, getComponentOptionsJSString, getComponentSecurity, getComponentSecurityClass, getConditionalRefresh, getConditionalRefreshConditionJs, getConditionalRefreshControlNames, getContext, getEventCode, getFactoryId, getFinalizeMethodAdditionalArguments, getFinalizeMethodInvoker, getFinalizeMethodToCall, getId, getOnBlurScript, getOnChangeScript, getOnClickScript, getOnCloseScript, getOnDblClickScript, getOnDocumentReadyScript, getOnFocusScript, getOnKeyDownScript, getOnKeyPressScript, getOnKeyUpScript, getOnLoadScript, getOnMouseDownScript, getOnMouseMoveScript, getOnMouseOutScript, getOnMouseOverScript, getOnMouseUpScript, getOnSubmitScript, getOnUnloadScript, getOrder, getProgressiveDisclosureConditionJs, getProgressiveDisclosureControlNames, getProgressiveRender, getPropertyReplacerComponents, getPropertyReplacers, getRefreshDiscloseMethodToCall, getRefreshWhenChanged, getRefreshWhenChangedControlNames, getRenderOutput, getRequired, getRowSpan, getStyle, getStyleClasses, getStyleClassesAsString, getSupportsOnBlur, getSupportsOnChange, getSupportsOnClick, getSupportsOnClose, getSupportsOnDblClick, getSupportsOnFocus, getSupportsOnKeyDown, getSupportsOnKeyPress, getSupportsOnKeyUp, getSupportsOnMouseDown, getSupportsOnMouseMove, getSupportsOnMouseOut, getSupportsOnMouseOver, getSupportsOnMouseUp, getSupportsOnUnload, getTemplate, getTitle, getValign, getWidth, isHidden, isProgressiveRenderAndRefresh, isProgressiveRenderViaAJAX, isReadOnly, isRefresh, isRefreshedByAction, isRender, isResetDataOnRefresh, isSelfRendered, isSkipInTabOrder, pushAllToContext, pushObjectToContext, pushToPropertyReplacerContext, setAlign, setColSpan, setComponentModifiers, setComponentOptions, setComponentOptionsJSString, setComponentSecurity, setConditionalRefresh, setContext, setFactoryId, setFinalizeMethodAdditionalArguments, setFinalizeMethodInvoker, setFinalizeMethodToCall, setHidden, setId, setOnBlurScript, setOnChangeScript, setOnClickScript, setOnCloseScript, setOnDblClickScript, setOnDocumentReadyScript, setOnFocusScript, setOnKeyDownScript, setOnKeyPressScript, setOnKeyUpScript, setOnLoadScript, setOnMouseDownScript, setOnMouseMoveScript, setOnMouseOutScript, setOnMouseOverScript, setOnMouseUpScript, setOnSubmitScript, setOnUnloadScript, setOrder, setProgressiveRender, setProgressiveRenderAndRefresh, setProgressiveRenderViaAJAX, setPropertyReplacers, setReadOnly, setRefresh, setRefreshDiscloseMethodToCall, setRefreshedByAction, setRefreshWhenChanged, setRender, setRenderOutput, setRequired, setResetDataOnRefresh, setRowSpan, setSelfRendered, setSkipInTabOrder, setStyle, setStyleClasses, setTemplate, setTitle, setValign, setWidth
 
Methods inherited from class org.kuali.rice.krad.uif.component.ConfigurableBase
getPropertyExpression, getPropertyExpressions, setPropertyExpressions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.kuali.rice.krad.uif.component.Component
addStyleClass, appendToStyle, getColSpan, getComponentModifiers, getComponentOptions, getComponentOptionsJSString, getComponentSecurity, getConditionalRefresh, getConditionalRefreshConditionJs, getConditionalRefreshControlNames, getContext, getFactoryId, getFinalizeMethodAdditionalArguments, getFinalizeMethodInvoker, getFinalizeMethodToCall, getId, getOrder, getProgressiveDisclosureConditionJs, getProgressiveDisclosureControlNames, getProgressiveRender, getPropertyReplacerComponents, getPropertyReplacers, getRefreshWhenChanged, getRefreshWhenChangedControlNames, getRenderOutput, getRequired, getRowSpan, getStyle, getStyleClasses, getTemplate, getTitle, isHidden, isProgressiveRenderAndRefresh, isProgressiveRenderViaAJAX, isReadOnly, isRefresh, isRefreshedByAction, isRender, isResetDataOnRefresh, isSelfRendered, pushAllToContext, pushObjectToContext, setColSpan, setComponentModifiers, setComponentOptions, setComponentOptionsJSString, setComponentSecurity, setConditionalRefresh, setContext, setFactoryId, setHidden, setId, setOrder, setProgressiveRender, setProgressiveRenderAndRefresh, setProgressiveRenderViaAJAX, setPropertyReplacers, setReadOnly, setRefresh, setRefreshedByAction, setRefreshWhenChanged, setRender, setRenderOutput, setRequired, setResetDataOnRefresh, setRowSpan, setSelfRendered, setStyle, setStyleClasses, setTemplate, setTitle
 
Methods inherited from interface org.kuali.rice.krad.uif.component.Configurable
getPropertyExpression, getPropertyExpressions, setPropertyExpressions
 
Methods inherited from interface org.kuali.rice.krad.uif.component.ScriptEventSupport
getOnBlurScript, getOnChangeScript, getOnClickScript, getOnCloseScript, getOnDblClickScript, getOnDocumentReadyScript, getOnFocusScript, getOnKeyDownScript, getOnKeyPressScript, getOnKeyUpScript, getOnLoadScript, getOnMouseDownScript, getOnMouseMoveScript, getOnMouseOutScript, getOnMouseOverScript, getOnMouseUpScript, getOnSubmitScript, getOnUnloadScript, getSupportsOnBlur, getSupportsOnChange, getSupportsOnClick, getSupportsOnClose, getSupportsOnDblClick, getSupportsOnFocus, getSupportsOnKeyDown, getSupportsOnKeyPress, getSupportsOnKeyUp, getSupportsOnMouseDown, getSupportsOnMouseMove, getSupportsOnMouseOut, getSupportsOnMouseOver, getSupportsOnMouseUp, getSupportsOnUnload, setOnBlurScript, setOnDocumentReadyScript, setOnLoadScript
 

Field Detail

defaultSortAscending

protected boolean defaultSortAscending
Constructor Detail

LookupView

public LookupView()
Method Detail

performInitialization

public void performInitialization(View view,
                                  Object model)
The following initialization is performed:

Specified by:
performInitialization in interface Component
Overrides:
performInitialization in class View
Parameters:
view - - view instance in which the component belongs
model - - object instance containing the view data
See Also:
ContainerBase.performInitialization(org.kuali.rice.krad.uif.view.View, java.lang.Object)

initializeGroups

protected void initializeGroups()

performApplyModel

public void performApplyModel(View view,
                              Object model,
                              Component parent)
Description copied from class: ComponentBase
The following updates are done here:

Specified by:
performApplyModel in interface Component
Overrides:
performApplyModel in class ContainerBase
Parameters:
view - - view instance to which the component belongs
model - - Top level object containing the data (could be the form or a top level business object, dto)
See Also:
org.kuali.rice.krad.uif.container.ContainerBase#performApplyModel(org.kuali.rice.krad.uif.view.View, java.lang.Object)

getComponentPrototypes

public List<Component> getComponentPrototypes()
Description copied from interface: Component
List of components that are maintained by the component as prototypes for creating other component instances

Prototypes 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.

Specified by:
getComponentPrototypes in interface Component
Overrides:
getComponentPrototypes in class View
Returns:
List child component prototypes
See Also:
Component.getComponentPrototypes()

applyConditionalLogicForFieldDisplay

public void applyConditionalLogicForFieldDisplay()

getDataObjectClassName

public Class<?> getDataObjectClassName()
Class name for the object the lookup applies to

The object class name is used to pick up a dictionary entry which will feed the attribute field definitions and other configuration. In addition it is to configure the Lookupable which will carry out the lookup action

Returns:
Class lookup data object class

setDataObjectClassName

public void setDataObjectClassName(Class<?> dataObjectClassName)
Setter for the object class name

Parameters:
dataObjectClassName -

isHideReturnLinks

public boolean isHideReturnLinks()
Returns:
the hideReturnLinks

setHideReturnLinks

public void setHideReturnLinks(boolean hideReturnLinks)
Parameters:
hideReturnLinks - the hideReturnLinks to set

isSuppressActions

public boolean isSuppressActions()
Returns:
the suppressActions

setSuppressActions

public void setSuppressActions(boolean suppressActions)
Parameters:
suppressActions - the suppressActions to set

isShowMaintenanceLinks

public boolean isShowMaintenanceLinks()
Returns:
the showMaintenanceLinks

setShowMaintenanceLinks

public void setShowMaintenanceLinks(boolean showMaintenanceLinks)
Parameters:
showMaintenanceLinks - the showMaintenanceLinks to set

isMultipleValuesSelect

public boolean isMultipleValuesSelect()
Indicates whether multiple values select should be enabled for the lookup

When set to true, the select field is enabled for the lookup results group that allows the user to select one or more rows for returning

Returns:
boolean true if multiple values should be enabled, false otherwise

setMultipleValuesSelect

public void setMultipleValuesSelect(boolean multipleValuesSelect)
Setter for the multiple values select indicator

Parameters:
multipleValuesSelect -

getResultsActionsField

public Field getResultsActionsField()
Returns:
the resultsActionsField

setResultsActionsField

public void setResultsActionsField(Field resultsActionsField)
Parameters:
resultsActionsField - the resultsActionsField to set

getResultsReturnField

public Field getResultsReturnField()
Returns:
the resultsReturnField

setResultsReturnField

public void setResultsReturnField(Field resultsReturnField)
Parameters:
resultsReturnField - the resultsReturnField to set

getCriteriaGroup

public Group getCriteriaGroup()

setCriteriaGroup

public void setCriteriaGroup(Group criteriaGroup)

getResultsGroup

public CollectionGroup getResultsGroup()

setResultsGroup

public void setResultsGroup(CollectionGroup resultsGroup)

getCriteriaFields

public List<Component> getCriteriaFields()

setCriteriaFields

public void setCriteriaFields(List<Component> criteriaFields)

getResultFields

public List<Component> getResultFields()

setResultFields

public void setResultFields(List<Component> resultFields)

getDefaultSortAttributeNames

public List<String> getDefaultSortAttributeNames()

setDefaultSortAttributeNames

public void setDefaultSortAttributeNames(List<String> defaultSortAttributeNames)

isDefaultSortAscending

public boolean isDefaultSortAscending()

setDefaultSortAscending

public void setDefaultSortAscending(boolean defaultSortAscending)

getResultSetLimit

public Integer getResultSetLimit()
Retrieves the maximum number of records that will be listed as a result of the lookup search

Returns:
Integer result set limit

setResultSetLimit

public void setResultSetLimit(Integer resultSetLimit)
Setter for the result list limit

Parameters:
resultSetLimit - Integer specifying limit

hasResultSetLimit

public boolean hasResultSetLimit()
Indicates whether a result set limit has been specified for the view

Returns:
true if this instance has a result set limit

setReturnTarget

public void setReturnTarget(String returnTarget)
Parameters:
returnTarget - the returnTarget to set

getReturnTarget

public String getReturnTarget()
Returns:
the returnTarget

isReturnByScript

public boolean isReturnByScript()
Returns:
the returnByScript

setReturnByScript

public void setReturnByScript(boolean returnByScript)
Setter for the flag to indicate that lookups will return the value by script and not a post

Parameters:
returnByScript - the returnByScript flag

getMaintenanceUrlMapping

public String getMaintenanceUrlMapping()
String that maps to the maintenance controller for the maintenance document (if any) associated with the lookup data object class

Mapping will be used to build the maintenance action links (such as edit, copy, and new). If not given, the default maintenance mapping will be used

Returns:
String mapping string

setMaintenanceUrlMapping

public void setMaintenanceUrlMapping(String maintenanceUrlMapping)
Setter for the URL mapping string that will be used to build up maintenance action URLs

Parameters:
maintenanceUrlMapping -


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.