Class LookupForm
- All Implemented Interfaces:
Serializable,ViewModel
LookupView.- Author:
- Kuali Rice Team (rice.collab@kuali.org)
- See Also:
-
Field Summary
Fields inherited from class org.kuali.rice.krad.web.form.UifFormBase
actionFlags, actionParameters, addedCollectionItems, ajaxRequest, ajaxReturnType, applyDefaultValues, attachmentFile, canEditView, clientStateForSyncing, controllerMapping, csrfToken, dialogExplanations, dialogResponses, dirtyForm, editModes, evaluateFlagsAndModes, extensionData, flowKey, focusId, formKey, formPostUrl, growlScript, historyFlow, historyManager, jumpToId, jumpToName, methodToCall, newCollectionLines, pageId, readOnlyFieldsList, renderedInDialog, renderedInIframe, request, requestedFormKey, requestRedirected, returnDialogId, returnDialogResponse, returnFormKey, returnLocation, selectedCollectionLines, selectedLookupResultsCache, sessionId, sessionTimeoutInterval, showDialogId, state, triggerActionId, updateComponentId, view, viewId, viewName, viewPostMetadata, viewRequestParameters, viewTypeName -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionClass name for the data object the lookup should be performed against.Map of conversions that should occur on the lookup return between properties on the lookup data object and properties on the calling view.Returns anLookupableinstance associated with the lookup view.For the case of multi-value lookup, indicates the collection that should be populated with the return results.Map containing the criteria to be used for performing the search.Collection<?> Holds the results of a search action.Holds the column names for the multi-value lookup selected values Note: as of KULRICE-12125 secure field names will not be stored in this parameterId for the quickfinder that triggered the lookup action (if any).String containing references that should be refreshed when the lookup returns, passed back on the return URL.Name of the window the lookup should return to.booleanbooleanIndicates whether multiple values select should be enabled for the lookup.booleanIndicates whether the requested was redirected from the lookup framework due to an external object request.booleanIndicates whether the return value from the lookup should occur through script or a server side post (default is false, server side post).voidpostBind(javax.servlet.http.HttpServletRequest request) Picks out data object name from the request to retrieve a lookupable and for the initial get request populates thegetFieldConversions()property.voidsetDataObjectClassName(String dataObjectClassName) Setter forgetDataObjectClassName()voidsetDisplayResults(boolean displayResults) voidsetFieldConversions(Map<String, String> fieldConversions) voidsetLookupCollectionId(String lookupCollectionId) voidsetLookupCollectionName(String lookupCollectionName) voidsetLookupCriteria(Map<String, String> lookupCriteria) voidsetLookupResults(Collection<?> lookupResults) voidsetMultipleValuesSelect(boolean multipleValuesSelect) voidsetMultiValueReturnFields(List<String> multiValueReturnFields) voidsetQuickfinderId(String quickfinderId) voidsetRedirectedLookup(boolean redirectedLookup) voidsetReferencesToRefresh(String referencesToRefresh) voidsetReturnByScript(boolean returnByScript) voidsetReturnTarget(String returnTarget) org.kuali.rice.krad.lookup.LookupForm#getReturnTarget()Methods inherited from class org.kuali.rice.krad.web.form.UifFormBase
generateFormKey, getActionEvent, getActionFlags, getActionParamaterValue, getActionParameters, getActionParametersAsProperties, getAddedCollectionItems, getAjaxReturnType, getAttachmentFile, getClientStateForSyncing, getControllerMapping, getCsrfToken, getDialogDataObject, getDialogExplanations, getDialogResponse, getDialogResponses, getEditModes, getExtensionData, getFlowKey, getFocusId, getFormKey, getFormPostUrl, getGrowlScript, getHistoryFlow, getHistoryManager, getInitialRequestParameters, getJumpToId, getJumpToName, getMethodToCall, getNewCollectionLines, getPageId, getReadOnlyFieldsList, getRequest, getRequestedFormKey, getRequestJsonTemplate, getRequestUrl, getReturnDialogId, getReturnDialogResponse, getReturnFormKey, getReturnLocation, getSelectedCollectionLines, getSelectedLookupResultsCache, getSessionId, getSessionTimeoutInterval, getShowDialogId, getState, getTriggerActionId, getUpdateComponent, getUpdateComponentId, getView, getViewHelperService, getViewId, getViewName, getViewPostMetadata, getViewRequestParameters, getViewService, getViewTypeName, isAddedCollectionItem, isAjaxRequest, isApplyDefaultValues, isCanEditView, isCollectionPagingRequest, isDirtyForm, isEvaluateFlagsAndModes, isJsonRequest, isRenderedInDialog, isRenderedInIframe, isRequestRedirected, isUpdateComponentRequest, isUpdateDialogRequest, isUpdateNoneRequest, isUpdatePageRequest, preBind, preRender, setActionFlags, setActionParameters, setAddedCollectionItems, setAjaxRequest, setAjaxReturnType, setApplyDefaultValues, setAttachmentFile, setCanEditView, setClientStateForSyncing, setCollectionPagingRequest, setCsrfToken, setDialogDataObject, setDialogExplanations, setDialogResponses, setDirtyForm, setDirtyForm, setEditModes, setEvaluateFlagsAndModes, setExtensionData, setFlowKey, setFocusId, setFormKey, setFormPostUrl, setGrowlScript, setHistoryFlow, setHistoryManager, setInitialRequestParameters, setJumpToId, setJumpToName, setMethodToCall, setNewCollectionLines, setPageId, setReadOnlyFieldsList, setRenderedInDialog, setRenderedInIframe, setRequest, setRequestedFormKey, setRequestJsonTemplate, setRequestRedirected, setRequestUrl, setReturnDialogId, setReturnDialogResponse, setReturnFormKey, setReturnLocation, setSelectedCollectionLines, setSelectedLookupResultsCache, setShowDialogId, setState, setTriggerActionId, setUpdateComponent, setUpdateComponentId, setView, setViewId, setViewName, setViewPostMetadata, setViewRequestParameters, setViewTypeName, toString
-
Constructor Details
-
LookupForm
public LookupForm()
-
-
Method Details
-
postBind
public void postBind(javax.servlet.http.HttpServletRequest request) Picks out data object name from the request to retrieve a lookupable and for the initial get request populates thegetFieldConversions()property. Called after Spring binds the request to the form and before the controller method is invoked- Specified by:
postBindin interfaceViewModel- Overrides:
postBindin classUifFormBase- Parameters:
request- request object containing the query parameters
-
getLookupable
Returns anLookupableinstance associated with the lookup view.- Returns:
- Lookupable instance or null if one does not exist
-
getDataObjectClassName
Class name for the data object the lookup should be performed against.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
Lookupablewhich will carry out the search action- Returns:
- lookup data object class
-
setDataObjectClassName
Setter forgetDataObjectClassName()- Parameters:
dataObjectClassName- property value
-
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) - See Also:
-
isRedirectedLookup
public boolean isRedirectedLookup()Indicates whether the requested was redirected from the lookup framework due to an external object request.This prevents the framework from performing another redirect check
- Returns:
- boolean true if request was a redirect, false if not
-
setRedirectedLookup
public void setRedirectedLookup(boolean redirectedLookup) - See Also:
-
isReturnByScript
public boolean isReturnByScript()Indicates whether the return value from the lookup should occur through script or a server side post (default is false, server side post).- Returns:
- boolean true if return should occur though script, false if return should be done through server side post
-
setReturnByScript
public void setReturnByScript(boolean returnByScript) - See Also:
-
getReturnTarget
Name of the window the lookup should return to.The lookup can be invoked from several different contexts: new tab, lightbox within top window, lightbox within portal window. When the request is made, this parameter can be sent to specify the target for the return links.
- Returns:
- String return target window name
-
setReturnTarget
org.kuali.rice.krad.lookup.LookupForm#getReturnTarget() -
getLookupCollectionName
For the case of multi-value lookup, indicates the collection that should be populated with the return results.- Returns:
- String collection name (must be full binding path)
-
setLookupCollectionName
- See Also:
-
getLookupCollectionId
-
setLookupCollectionId
-
getReferencesToRefresh
String containing references that should be refreshed when the lookup returns, passed back on the return URL.- Returns:
- String containing references that should be refreshed on return from lookup
-
setReferencesToRefresh
- See Also:
-
getQuickfinderId
Id for the quickfinder that triggered the lookup action (if any).When the lookup is triggered from a quickfinder, the return URLs will be present on the lookup results. In addition, the quickfinder id is passed back on the return URL so the caller can perform logic based on which quickfinder was invoked.
- Returns:
- String id for quickfinder that invoked the lookup
-
setQuickfinderId
- See Also:
-
getFieldConversions
Map of conversions that should occur on the lookup return between properties on the lookup data object and properties on the calling view.When a lookup is invoked from a calling view, the purpose is to return one or more values that will populate fields on the calling view. To accomplish this, values for properties on the selected record are passed back on the URL as values for properties on the calling view. This map specifies which properties on the lookup data object should be pulled, and for each one what is the property on the caller to send the value back as.
For example, suppose the map contained the entries id:document.bookId and title:document.bookTitle. When the return URL is selected for a record, the value for the id property will be retrieved and added to the return URL query string as 'document.bookId={idValue}'. Likewise the value for the title property will be pulled and added to the return URL query string as 'document.bookTitle={titleValue}'. So the query string will contain something like 'document.bookId=3invalid input: '&document'.bookTitle=Animals'
- Returns:
- Map of field conversions, each entry is a conversion between two properties. Key is property name on the lookup data object, entry value is the property name on the calling view/model
-
setFieldConversions
- See Also:
-
getMultiValueReturnFields
Holds the column names for the multi-value lookup selected values Note: as of KULRICE-12125 secure field names will not be stored in this parameter- Returns:
- a list of column names for the multi-value lookup
-
setMultiValueReturnFields
- See Also:
-
getLookupCriteria
Map containing the criteria to be used for performing the search.Fields that are defined in the
LookupView.getCriteriaGroup()bind to this map. The key of the map is the property path specified for the field, and the value of the map is the search value (if any) entered by the user. This map is then passed into theLookupableto carry out the search.- Returns:
- Map of search criteria where key is the property the criteria will be applied to and the value is the search value entered by the user (if any)
-
setLookupCriteria
- See Also:
-
getLookupResults
Holds the results of a search action.After the search action is invoked, the results of the search will be held by this property. The
LookupView.getResultsGroup()binds to this property for displaying the results.- Returns:
- Collection of data objects that are the result of a search
-
setLookupResults
- See Also:
-
isDisplayResults
public boolean isDisplayResults() -
setDisplayResults
public void setDisplayResults(boolean displayResults)
-