|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.krad.datadictionary.DictionaryBeanBase org.kuali.rice.krad.datadictionary.uif.UifDictionaryBeanBase org.kuali.rice.krad.uif.component.ComponentBase org.kuali.rice.krad.uif.widget.WidgetBase org.kuali.rice.krad.uif.widget.QuickFinder
public class QuickFinder
Widget for navigating to a lookup from a field (called a quickfinder)
Field Summary |
---|
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 | |
---|---|
QuickFinder()
|
Method Summary | |
---|---|
protected void |
addActionParameterIfNotNull(String parameterName,
Object parameterValue)
|
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 |
Boolean |
getDisableSearchButtons()
TODO: not implemented currently |
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 |
getHeaderBarEnabled()
TODO: not implemented currently |
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 |
Boolean |
getLookupCriteriaEnabled()
Indicates whether the lookup criteria (search group) should be enabled on the invoked lookup view |
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 |
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 |
setDisableSearchButtons(Boolean disableSearchButtons)
|
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 |
setHeaderBarEnabled(Boolean headerBarEnabled)
|
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 |
setLookupCriteriaEnabled(Boolean lookupCriteriaEnabled)
Setter for enabling the lookup criteria group |
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 |
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 |
Methods inherited from class org.kuali.rice.krad.uif.widget.WidgetBase |
---|
getComponentTypeName |
Methods inherited from class org.kuali.rice.krad.datadictionary.uif.UifDictionaryBeanBase |
---|
getExpressionGraph, getPropertyExpression, getPropertyExpressions, getRefreshExpressionGraph, setExpressionGraph, setPropertyExpressions, setRefreshExpressionGraph |
Methods inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase |
---|
getComponentCode, getNamespaceCode, setComponentCode, setNamespaceCode |
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.datadictionary.uif.UifDictionaryBean |
---|
getExpressionGraph, getPropertyExpression, getPropertyExpressions, getRefreshExpressionGraph, setExpressionGraph, setPropertyExpressions, setRefreshExpressionGraph |
Methods inherited from interface org.kuali.rice.krad.datadictionary.DictionaryBean |
---|
getComponentCode, getNamespaceCode |
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, setOnBlurScript, setOnLoadScript |
Constructor Detail |
---|
public QuickFinder()
Method Detail |
---|
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 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 getLookupCriteriaEnabled()
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 setLookupCriteriaEnabled(Boolean lookupCriteriaEnabled)
lookupCriteriaEnabled
- public Boolean getSupplementalActionsEnabled()
public void setSupplementalActionsEnabled(Boolean supplementalActionsEnabled)
public Boolean getDisableSearchButtons()
public void setDisableSearchButtons(Boolean disableSearchButtons)
public Boolean getHeaderBarEnabled()
public void setHeaderBarEnabled(Boolean headerBarEnabled)
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
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |