public class QuickFinder extends WidgetBase
INITIAL_ORDER_VALUE
Constructor and Description |
---|
QuickFinder() |
Modifier and Type | Method and Description |
---|---|
protected void |
addActionParameterIfNotNull(String parameterName,
Object parameterValue) |
protected <T> void |
copyProperties(T component)
Copies the properties over for the copy method
|
protected void |
generateFieldConversions(InputField field,
DataObjectRelationship relationship) |
protected void |
generateLookupParameters(InputField field,
DataObjectRelationship relationship) |
Boolean |
getAutoSearch()
Indicates whether the search should be executed when first rendering the lookup view
|
String |
getBaseLookupUrl()
Returns the URL for the lookup for which parameters will be added
|
List<Component> |
getComponentsForLifecycle()
List of components that are contained within the component and should be sent through
the lifecycle
|
String |
getDataObjectClassName()
Full class name the lookup should be provided for
|
Map<String,String> |
getFieldConversions()
Map that determines what properties from a result lookup row (if selected) will be returned to properties on
the calling view
|
Boolean |
getHideReturnLink()
Indicates whether the return links for lookup results should be rendered
|
LightBox |
getLightBoxLookup()
LightBoxLookup widget for the field
|
String |
getLookupCollectionName()
For the case of multi-value lookup, indicates the collection that should be populated with
the return results
|
Map<String,String> |
getLookupParameters()
Map that determines what properties from a calling view will be sent to properties on that are rendered
for the lookup view's search fields (they can be hidden)
|
Boolean |
getMultipleValuesSelect()
Indicates whether a multi-values lookup should be requested
|
Action |
getQuickfinderAction()
Action component that is used to rendered for the field for invoking the quickfinder action (bringin up the
lookup)
|
String |
getReadOnlySearchFields()
Comma delimited String of property names on the lookup view that should be read only
|
String |
getReferencesToRefresh()
List of property names on the model that should be refreshed when the lookup returns
|
protected DataObjectRelationship |
getRelationshipForField(View view,
Object model,
InputField field) |
Boolean |
getRenderHeader()
Indicates whether the lookup header should be rendered
|
Boolean |
getRenderLookupCriteria()
Indicates whether the lookup criteria (search group) should be enabled on the invoked lookup view
|
Boolean |
getRenderSearchButtons()
Indicates that the action buttons like search in the criteria section should be rendered
|
Boolean |
getShowMaintenanceLinks()
Indicates whether the maintenance action links should be rendered for the invoked lookup view
|
Boolean |
getSupplementalActionsEnabled()
TODO: not implemented currently
|
Boolean |
getSuppressActions()
Indicates whether the maintenance actions (or others) are rendered on the invoked lookup view
|
String |
getViewName()
When multiple target lookup views exists for the same data object class, the view name can be set to
determine which one to use
|
void |
performFinalize(View view,
Object model,
Component parent)
The following finalization is performed:
Sets defaults on collectionLookup such as collectionName, and the class if not set
|
void |
performInitialization(View view,
Object model)
The following initialization is performed:
Set defaults for binding
|
void |
setAutoSearch(Boolean autoSearch)
Setter for the auto search indicator
|
void |
setBaseLookupUrl(String baseLookupUrl)
Setter for the lookup base url (domain, context, and controller)
|
void |
setDataObjectClassName(String dataObjectClassName)
Setter for the class name that lookup should be provided for
|
void |
setFieldConversions(Map<String,String> fieldConversions)
Setter for the map that determines what properties on a lookup result row are returned and how they map to
properties on the calling view
|
void |
setHideReturnLink(Boolean hideReturnLink)
Setter for the hide return link indicator
|
void |
setLightBoxLookup(LightBox lightBoxLookup)
Setter for the light box lookup widget
|
void |
setLookupCollectionName(String lookupCollectionName)
Setter for the name of the collection that should be populated with lookup results
|
void |
setLookupParameters(Map<String,String> lookupParameters)
Setter for the map that determines what property values on the calling view will be sent to properties on the
lookup views search fields
|
void |
setMultipleValuesSelect(Boolean multipleValuesSelect)
Setter for the multi-values lookup indicator
|
void |
setQuickfinderAction(Action quickfinderAction)
Setter for the action field component to render for the quickfinder
|
void |
setReadOnlySearchFields(String readOnlySearchFields)
Setter for property names for criteria fields on the lookup view that should be read-only (multiple property
names are specified using a comma delimiter)
|
void |
setReferencesToRefresh(String referencesToRefresh)
Setter for the list of property names that should be refreshed when the lookup returns
|
void |
setRenderHeader(Boolean renderHeader)
Setter for the header render flag
|
void |
setRenderLookupCriteria(Boolean renderLookupCriteria)
Setter for enabling the lookup criteria group
|
void |
setRenderSearchButtons(Boolean renderSearchButtons)
Setter for the render search buttons flag
|
void |
setShowMaintenanceLinks(Boolean showMaintenanceLinks)
Setter for the show maintenance links indicator
|
void |
setSupplementalActionsEnabled(Boolean supplementalActionsEnabled) |
void |
setSuppressActions(Boolean suppressActions)
Setter for the suppress actions indicator
|
void |
setViewName(String viewName)
Setter for the view name configured on the lookup view that should be invoked by the quickfinder widget
|
void |
updateFieldConversions(BindingInfo bindingInfo)
Adjusts the path on the field conversion to property to match the binding
path prefix of the given
BindingInfo |
void |
updateLookupParameters(BindingInfo bindingInfo)
Adjusts the path on the lookup parameter from property to match the binding
path prefix of the given
BindingInfo |
void |
updateReferencesToRefresh(BindingInfo bindingInfo)
Adjust the path on the referencesToRefresh parameter to match the binding path
prefix of the given
BindingInfo |
getComponentTypeName
addCellCssClass, addDataAttribute, addDataAttributeIfNonEmpty, addStyleClass, appendToStyle, completeValidation, copy, getAdditionalComponentsToRefresh, getAdditionalComponentsToRefreshJs, getAdditionalCssClasses, getAlign, getBaseId, getCellCssClasses, getCellStyle, getCellStyleClassesAsString, getCellWidth, getColSpan, getComponentModifiers, getComponentPrototypes, getComponentSecurity, getComponentSecurityClass, getConditionalRefresh, getConditionalRefreshConditionJs, getConditionalRefreshControlNames, getContext, getCssClasses, getDataAttributes, getEventHandlerScript, getFinalizeMethodAdditionalArguments, getFinalizeMethodInvoker, getFinalizeMethodToCall, getId, getLibraryCssClasses, getMethodToCallOnRefresh, getOnBlurScript, getOnChangeScript, getOnClickScript, getOnCloseScript, getOnDblClickScript, getOnDocumentReadyScript, getOnFocusScript, getOnKeyDownScript, getOnKeyPressScript, getOnKeyUpScript, getOnLoadScript, getOnMouseDownScript, getOnMouseMoveScript, getOnMouseOutScript, getOnMouseOverScript, getOnMouseUpScript, getOnSubmitScript, getOnUnloadScript, getOrder, getPostRenderContent, getPreRenderContent, getProgressiveDisclosureConditionJs, getProgressiveDisclosureControlNames, getProgressiveRender, getPropertyReplacerComponents, getPropertyReplacers, getRefreshTimer, getRefreshWhenChangedPropertyNames, getRenderedHtmlOutput, getRequired, getRowSpan, getSimpleDataAttributes, getStyle, getStyleClassesAsString, getTemplate, getTemplateName, getTemplateOptions, getTemplateOptionsJSString, getTitle, getToolTip, getValign, getWidth, isDisableSessionPersistence, isDisclosedByAction, isForceSessionPersistence, isHidden, isProgressiveRenderAndRefresh, isProgressiveRenderViaAJAX, isReadOnly, isRefreshedByAction, isRender, isResetDataOnRefresh, isRetrieveViaAjax, isSelfRendered, isSkipInTabOrder, performApplyModel, pushAllToContext, pushObjectToContext, pushToPropertyReplacerContext, setAdditionalComponentsToRefresh, setAdditionalCssClasses, setAlign, setBaseId, setCellCssClasses, setCellStyle, setCellWidth, setColSpan, setComponentModifiers, setComponentSecurity, setConditionalRefresh, setContext, setCssClasses, setDataAttributes, setDisableSessionPersistence, setDisclosedByAction, setFinalizeMethodAdditionalArguments, setFinalizeMethodInvoker, setFinalizeMethodToCall, setForceSessionPersistence, setHidden, setId, setLibraryCssClasses, setMethodToCallOnRefresh, setOnBlurScript, setOnChangeScript, setOnClickScript, setOnCloseScript, setOnDblClickScript, setOnDocumentReadyScript, setOnFocusScript, setOnKeyDownScript, setOnKeyPressScript, setOnKeyUpScript, setOnLoadScript, setOnMouseDownScript, setOnMouseMoveScript, setOnMouseOutScript, setOnMouseOverScript, setOnMouseUpScript, setOnSubmitScript, setOnUnloadScript, setOrder, setPostRenderContent, setPreRenderContent, setProgressiveRender, setProgressiveRenderAndRefresh, setProgressiveRenderViaAJAX, setPropertyReplacers, setReadOnly, setRefreshedByAction, setRefreshTimer, setRefreshWhenChangedPropertyNames, setRender, setRenderedHtmlOutput, setRequired, setResetDataOnRefresh, setRetrieveViaAjax, setRowSpan, setSelfRendered, setSkipInTabOrder, setStyle, setTemplate, setTemplateName, setTemplateOptions, setTemplateOptionsJSString, setTitle, setToolTip, setValign, setWidth
getExpressionGraph, getPropertyExpression, getPropertyExpressions, getRefreshExpressionGraph, setExpressionGraph, setPropertyExpressions, setRefreshExpressionGraph
getComponentCode, getNamespaceCode, setComponentCode, setNamespaceCode
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addCellCssClass, addDataAttribute, addStyleClass, appendToStyle, completeValidation, copy, getAdditionalComponentsToRefresh, getAdditionalComponentsToRefreshJs, getAdditionalCssClasses, getAlign, getBaseId, getCellCssClasses, getCellStyle, getCellWidth, getColSpan, getComponentModifiers, getComponentPrototypes, getComponentSecurity, getConditionalRefresh, getConditionalRefreshConditionJs, getConditionalRefreshControlNames, getContext, getCssClasses, getDataAttributes, getEventHandlerScript, getFinalizeMethodAdditionalArguments, getFinalizeMethodInvoker, getFinalizeMethodToCall, getId, getLibraryCssClasses, getOrder, getPostRenderContent, getPreRenderContent, getProgressiveDisclosureConditionJs, getProgressiveDisclosureControlNames, getProgressiveRender, getPropertyReplacerComponents, getPropertyReplacers, getRefreshTimer, getRefreshWhenChangedPropertyNames, getRenderedHtmlOutput, getRequired, getRowSpan, getSimpleDataAttributes, getStyle, getTemplate, getTemplateName, getTemplateOptions, getTemplateOptionsJSString, getTitle, getToolTip, getValign, getWidth, isDisableSessionPersistence, isDisclosedByAction, isForceSessionPersistence, isHidden, isProgressiveRenderAndRefresh, isProgressiveRenderViaAJAX, isReadOnly, isRefreshedByAction, isRender, isResetDataOnRefresh, isRetrieveViaAjax, isSelfRendered, performApplyModel, pushAllToContext, pushObjectToContext, setAdditionalComponentsToRefresh, setAdditionalCssClasses, setAlign, setBaseId, setCellCssClasses, setCellStyle, setCellWidth, setColSpan, setComponentModifiers, setComponentSecurity, setConditionalRefresh, setContext, setCssClasses, setDataAttributes, setDisableSessionPersistence, setDisclosedByAction, setForceSessionPersistence, setHidden, setId, setLibraryCssClasses, setOrder, setPostRenderContent, setPreRenderContent, setProgressiveRender, setProgressiveRenderAndRefresh, setProgressiveRenderViaAJAX, setPropertyReplacers, setReadOnly, setRefreshedByAction, setRefreshTimer, setRefreshWhenChangedPropertyNames, setRender, setRenderedHtmlOutput, setRequired, setResetDataOnRefresh, setRetrieveViaAjax, setRowSpan, setSelfRendered, setStyle, setTemplate, setTemplateName, setTemplateOptions, setTemplateOptionsJSString, setTitle, setToolTip, setValign, setWidth
getExpressionGraph, getPropertyExpression, getPropertyExpressions, getRefreshExpressionGraph, setExpressionGraph, setPropertyExpressions, setRefreshExpressionGraph
getComponentCode, getNamespaceCode
getOnBlurScript, getOnChangeScript, getOnClickScript, getOnCloseScript, getOnDblClickScript, getOnDocumentReadyScript, getOnFocusScript, getOnKeyDownScript, getOnKeyPressScript, getOnKeyUpScript, getOnLoadScript, getOnMouseDownScript, getOnMouseMoveScript, getOnMouseOutScript, getOnMouseOverScript, getOnMouseUpScript, getOnSubmitScript, getOnUnloadScript, setOnBlurScript, setOnChangeScript, setOnClickScript, setOnCloseScript, setOnDblClickScript, setOnDocumentReadyScript, setOnFocusScript, setOnKeyDownScript, setOnKeyPressScript, setOnKeyUpScript, setOnLoadScript, setOnMouseDownScript, setOnMouseMoveScript, setOnMouseOutScript, setOnMouseOverScript, setOnMouseUpScript, setOnSubmitScript, setOnUnloadScript
public QuickFinder()
public void performInitialization(View view, Object model)
performInitialization
in interface Component
performInitialization
in class ComponentBase
view
- - view instance in which the component belongsmodel
- - object instance containing the view dataComponentBase.performInitialization(org.kuali.rice.krad.uif.view.View,
java.lang.Object)
public void performFinalize(View view, Object model, Component parent)
If the data object class was not configured for the lookup, the class configured for the collection group will be used if it has a lookup defined. If not data object class is found for the lookup it will be disabled. The collection name is also defaulted to the binding path for this collection group, so the results returned from the lookup will populate this collection. Finally field conversions will be generated based on the PK fields of the collection object class
performFinalize
in interface Component
performFinalize
in class ComponentBase
view
- - view instance that should be finalized for renderingmodel
- - top level object containing the dataparent
- - parent componentComponent.performFinalize(org.kuali.rice.krad.uif.view.View,
java.lang.Object, org.kuali.rice.krad.uif.component.Component)
protected void addActionParameterIfNotNull(String parameterName, Object parameterValue)
protected DataObjectRelationship getRelationshipForField(View view, Object model, InputField field)
protected void generateFieldConversions(InputField field, DataObjectRelationship relationship)
protected void generateLookupParameters(InputField field, DataObjectRelationship relationship)
public void updateFieldConversions(BindingInfo bindingInfo)
BindingInfo
bindingInfo
- binding info instance to copy binding path prefix frompublic void updateLookupParameters(BindingInfo bindingInfo)
BindingInfo
bindingInfo
- binding info instance to copy binding path prefix frompublic void updateReferencesToRefresh(BindingInfo bindingInfo)
BindingInfo
bindingInfo
- binding info instance to copy binding path prefix frompublic List<Component> getComponentsForLifecycle()
Component
Used by ViewHelperService
for the various lifecycle callbacks
getComponentsForLifecycle
in interface Component
getComponentsForLifecycle
in class ComponentBase
ComponentBase.getComponentsForLifecycle()
public String getBaseLookupUrl()
The base URL includes the domain, context, and controller mapping for the lookup invocation. Parameters are then added based on configuration to complete the URL. This is generally defaulted to the application URL and internal KRAD servlet mapping, but can be changed to invoke another application such as the Rice standalone server
public void setBaseLookupUrl(String baseLookupUrl)
baseLookupUrl
- public String getDataObjectClassName()
This is passed on to the lookup request for the data object the lookup should be rendered for. This is then
used by the lookup framework to select the lookup view (if more than one lookup view exists for the same
data object class name, the getViewName()
property should be specified to select the view to render).
public void setDataObjectClassName(String dataObjectClassName)
dataObjectClassName
- public String getViewName()
When creating multiple lookup views for the same data object class, the view name can be specified for the different versions (for example 'simple' and 'advanced'). When multiple lookup views exist the view name must be sent with the data object class for the request. Note the view id can be alternatively used to uniquely identify the lookup view
public void setViewName(String viewName)
viewName
- public String getReferencesToRefresh()
Note this is only relevant when the return by script option is not enabled (meaning the server will be invoked on the lookup return call)
When a lookup return call is made (to return a result value) the controller refresh method will be invoked. If refresh properties are configured, a call to refresh those references from the database will be made. This is useful if the lookup returns a foreign key field and the related record is needed.
public void setReferencesToRefresh(String referencesToRefresh)
referencesToRefresh
- public Map<String,String> getFieldConversions()
The purpose of using the lookup is to search for a particular value and return that value to the form being completed. In order for the lookup framework to return the field back to us, we must specify the name of the field on the data object class whose value we need, and the name of the field on the calling view. Furthermore, we can choose to have the lookup return additional fields that populate other form fields or informational properties (see ‘Field Queries and Informational Properties’). These pairs of fields are known as ‘field conversions’.
The fieldConversions property is a Map. Each entry represents a field that will be returned back from the lookup, with the entry key being the field name on the data object class, and the entry value being the field name on the calling view. It is helpful to think of this as a from-to mapping. Pulling from the data object field (map key) to the calling view field (map value).
public void setFieldConversions(Map<String,String> fieldConversions)
fieldConversions
- public Map<String,String> getLookupParameters()
When invoking a lookup view, we can pre-populate search fields on the lookup view with data from the view that called the lookup. The user can then perform the search with these values, or (if edited is allowed or the fields are not hidden) change the passed in values. When the lookup is invoked, the values for the properties configured within the lookup parameters Map will be pulled and passed along as values for the lookup view properties
public void setLookupParameters(Map<String,String> lookupParameters)
lookupParameters
- public String getReadOnlySearchFields()
When requesting a lookup view, property names for fields that are rendered as search criteria can be marked as read-only. This is usually done when a lookup parameter for that property is sent in and the user should not be allowed to change the value
public void setReadOnlySearchFields(String readOnlySearchFields)
readOnlySearchFields
- public Boolean getHideReturnLink()
A lookup view can be invoked to allow the user to select a value (or set of values) to return back to the calling view. For single value lookups this is done with a return link that is rendered for each row. This return link can be disabled by setting this property to true
public void setHideReturnLink(Boolean hideReturnLink)
hideReturnLink
- public Boolean getSuppressActions()
By default a lookup view will add an actions column for the result table that display maintenance links (in addition to a new link at the top of the page) if a maintenance action is available. Custom links can also be added to the action column as necessary. This flag can be set to true to suppress the rendering of the actions for the lookup call.
An example of when this might be useful is when invoking a lookup to return a value to a value. Generally in these cases you don't want to the user going off to another view (such as the maintenance view)
public void setSuppressActions(Boolean suppressActions)
suppressActions
- public Boolean getAutoSearch()
By default the lookup view is rendered, the user enters search values and executes the results. This flag can be set to true to indicate the search should be performed before showing the screen to the user. This is generally used when search criteria is being passed in as well
public void setAutoSearch(Boolean autoSearch)
autoSearch
- public Boolean getRenderLookupCriteria()
Setting the this to false will not display the lookup criteria but only the results. Therefore this is only
useful when setting getAutoSearch()
to true and passing in criteria
public void setRenderLookupCriteria(Boolean renderLookupCriteria)
renderLookupCriteria
- public Boolean getSupplementalActionsEnabled()
public void setSupplementalActionsEnabled(Boolean supplementalActionsEnabled)
public Boolean getRenderSearchButtons()
public void setRenderSearchButtons(Boolean renderSearchButtons)
renderSearchButtons
- public Boolean getRenderHeader()
Defaults to true. Can be set as bean property or passed as a request parameter in the lookup url.
public void setRenderHeader(Boolean renderHeader)
renderHeader
- public Boolean getShowMaintenanceLinks()
If a maintenance view exists for the data object associated with the lookup view, the framework will add links to initiate a new maintenance document. This flag can be used to disable the rendering of these links
Note this serves similar purpose to getSuppressActions()
but the intent is to only remove the
maintenance links in this situation, not the complete actions column TODO: this is not in place!
public void setShowMaintenanceLinks(Boolean showMaintenanceLinks)
showMaintenanceLinks
- public Action getQuickfinderAction()
Through the action configuration the image (or link, button) rendered for the quickfinder can be modified. In addition to other action component settings
public void setQuickfinderAction(Action quickfinderAction)
quickfinderAction
- public void setLightBoxLookup(LightBox lightBoxLookup)
lightBoxLookup
- LightBoxLookup
widget to setpublic LightBox getLightBoxLookup()
The light box lookup widget will change the lookup behaviour to open the lookup in a light box.
DirectInquiry
field DirectInquirypublic Boolean getMultipleValuesSelect()
public void setMultipleValuesSelect(Boolean multipleValuesSelect)
multipleValuesSelect
- public String getLookupCollectionName()
Note when the quickfinder is associated with a CollectionGroup
, this property is
set automatically from the collection name associated with the group
public void setLookupCollectionName(String lookupCollectionName)
lookupCollectionName
- protected <T> void copyProperties(T component)
ComponentBase
copyProperties
in class WidgetBase
component
- base beanComponentBase.copy()
Copyright © 2005–2016 The Kuali Foundation. All rights reserved.