Class Inquiry
- All Implemented Interfaces:
Serializable,Cloneable,Copyable,DictionaryBean,UifDictionaryBean,Component,Ordered,ScriptEventSupport,LifecycleElement,Widget,org.springframework.core.Ordered
The inquiry widget will render a button for the field value when
that field is editable. When read only the widget will create a link on the display value.
It points to the associated inquiry view for the field. The inquiry can be configured to point to a certain
InquiryView, or the framework will attempt to associate the field with a inquiry based on
its metadata (in particular its relationships in the model).
- 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
componentCode, namespaceCodeFields 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 TypeMethodDescriptionvoidInherits readOnly from parent if not explicitly populated.voidbuildInquiryLink(Object dataObject, String propertyName, Class<?> inquiryObjectClass, Map<String, String> inquiryParams) Builds the inquiry link based on the given inquiry class and parameterscreateTitleText(Class<?> dataObjectClass, Map<String, String> inquiryKeyValues) Gets text to prepend to the inquiry link titleReturns the URL for the inquiry for which parameters will be addedFull class name the inquiry should be provided forActionthat will be rendered next to the field for a direct inquiryLinkthat will be rendered for an inquiryMap that determines what properties from a calling view will be sent to properties on the inquiry data objectWhen multiple target inquiry views exists for the same data object class, the view name can be set to determine which one to usebooleanDetermines whether inquiry parameters adjustedbooleanIndicates that the direct inquiry will not be renderedprotected booleanDetermines whether a normal or direct inquiry should be enabledvoidperformFinalize(Object model, LifecycleElement parent) 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 renderedprotected voidsetAdjustInquiryParameters(boolean adjustInquiryParameters) Determines whether inquiry parameters adjustedvoidsetBaseInquiryUrl(String baseInquiryUrl) Setter for the inquiry base url (domain, context, and controller)voidsetDataObjectClassName(String dataObjectClassName) Setter for the class name that inquiry should be provided forvoidsetDirectInquiryAction(Action directInquiryAction) Setter for the direct inquiryActionvoidsetEnableDirectInquiry(boolean enableDirectInquiry) Setter for the hideDirectInquiry flagprotected voidsetFieldBindingInfo(BindingInfo fieldBindingInfo) Sets the field binding informationvoidsetInquiryLink(Link inquiryLink) Setter for the inquiryLinkvoidsetInquiryParameters(Map<String, String> inquiryParameters) Setter for the map that determines what property values on the calling view will be sent to properties on the inquiry data objectprotected voidsetParentReadOnly(boolean parentReadOnly) Determines whether a normal or direct inquiry should be enabledvoidsetViewName(String viewName) Setter for the view name configured on the inquiry view that should be invoked by the inquiry widgetvoidupdateInquiryParameters(BindingInfo bindingInfo) Adjusts the path on the inquiry parameter property to match the binding path prefix of the givenBindingInfoMethods inherited from class org.kuali.rice.krad.uif.widget.WidgetBase
getComponentTypeNameMethods inherited from class org.kuali.rice.krad.uif.component.ComponentBase
addAriaAttribute, addDataAttribute, addScriptDataAttribute, addStyleClass, addWrapperCssClass, appendToStyle, checkMutable, clone, completeValidation, getAdditionalComponentsToRefresh, getAdditionalComponentsToRefreshJs, getAdditionalCssClasses, getAdditionalTemplates, 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, notifyCompleted, performApplyModel, performInitialization, 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, getNamespaceCode, setComponentCode, setNamespaceCodeMethods 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, completeValidation, getAdditionalComponentsToRefresh, getAdditionalComponentsToRefreshJs, getAdditionalCssClasses, getAdditionalTemplates, 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, getComponentCode, getNamespaceCodeMethods inherited from interface org.kuali.rice.krad.uif.util.LifecycleElement
checkMutable, getContainerIdSuffix, getId, getPhasePathMapping, getViewPath, getViewStatus, isFinal, isInitialized, isModelApplied, isMutable, isRender, notifyCompleted, performApplyModel, performInitialization, 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
-
INQUIRY_TITLE_PREFIX
- See Also:
-
INQUIRY_TITLE_POSTFIX
- See Also:
-
-
Constructor Details
-
Inquiry
public Inquiry()
-
-
Method Details
-
afterEvaluateExpression
public void afterEvaluateExpression()Inherits readOnly from parent if not explicitly populated. 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
-
performFinalize
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
Here final preparations can be made based on the updated view state.
- Specified by:
performFinalizein interfaceLifecycleElement- Overrides:
performFinalizein classComponentBase- Parameters:
model- - top level object containing the dataparent- - parent component
-
updateInquiryParameters
Adjusts the path on the inquiry parameter property to match the binding path prefix of the givenBindingInfo- Parameters:
bindingInfo- binding info instance to copy binding path prefix from
-
buildInquiryLink
public void buildInquiryLink(Object dataObject, String propertyName, Class<?> inquiryObjectClass, Map<String, String> inquiryParams) Builds the inquiry link based on the given inquiry class and parameters- Parameters:
dataObject- parent object that contains the data (used to pull inquiry parameters)propertyName- name of the property the inquiry is set oninquiryObjectClass- class of the object the inquiry should point toinquiryParams- map of key field mappings for the inquiry
-
createTitleText
Gets text to prepend to the inquiry link title- Parameters:
dataObjectClass- data object class being inquired into- Returns:
- inquiry link title
-
getBaseInquiryUrl
Returns the URL for the inquiry for which parameters will be addedThe base URL includes the domain, context, and controller mapping for the inquiry 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
- Returns:
- inquiry base URL
-
setBaseInquiryUrl
Setter for the inquiry base url (domain, context, and controller)- Parameters:
baseInquiryUrl-
-
getDataObjectClassName
Full class name the inquiry should be provided forThis is passed on to the inquiry request for the data object the lookup should be rendered for. This is then used by the inquiry framework to select the lookup view (if more than one inquiry view exists for the same data object class name, the
getViewName()property should be specified to select the view to render).- Returns:
- inquiry class name
-
setDataObjectClassName
Setter for the class name that inquiry should be provided for- Parameters:
dataObjectClassName-
-
getViewName
When multiple target inquiry views exists for the same data object class, the view name can be set to determine which one to useWhen creating multiple inquiry views for the same data object class, the view name can be specified for the different versions (for example 'simple' and 'advanced'). When multiple inquiry 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 inquiry view
- Returns:
- view name
-
setViewName
Setter for the view name configured on the inquiry view that should be invoked by the inquiry widget- Parameters:
viewName-
-
getInquiryParameters
Map that determines what properties from a calling view will be sent to properties on the inquiry data objectWhen invoking an inquiry view, a query is done against the inquiries configured data object and the resulting record is display. The values for the properties configured within the inquiry parameters Map will be pulled and passed along as values for the inquiry data object properties (thus they form the criteria for the inquiry)
- Returns:
- mapping of calling view properties to inquiry data object properties
-
setInquiryParameters
Setter for the map that determines what property values on the calling view will be sent to properties on the inquiry data object- Parameters:
inquiryParameters-
-
getInquiryLink
Linkthat will be rendered for an inquiry- Returns:
- the inquiry link
-
setInquiryLink
Setter for the inquiryLink- Parameters:
inquiryLink- the inquiryLinkobject
-
getDirectInquiryAction
Actionthat will be rendered next to the field for a direct inquiry- Returns:
- the directInquiryAction
-
setDirectInquiryAction
Setter for the direct inquiryAction- Parameters:
directInquiryAction- the direct inquiryAction
-
isEnableDirectInquiry
public boolean isEnableDirectInquiry()Indicates that the direct inquiry will not be rendered- Returns:
- true if the direct inquiry should be rendered, false if not
-
setEnableDirectInquiry
public void setEnableDirectInquiry(boolean enableDirectInquiry) Setter for the hideDirectInquiry flag- Parameters:
enableDirectInquiry-
-
isParentReadOnly
protected boolean isParentReadOnly()Determines whether a normal or direct inquiry should be enabled- Returns:
- true if parent component is read only, false otherwise
-
setParentReadOnly
protected void setParentReadOnly(boolean parentReadOnly) Determines whether a normal or direct inquiry should be enabledUsed by unit tests and internally
- Parameters:
parentReadOnly- true if parent component is read only, false otherwise
-
isAdjustInquiryParameters
public boolean isAdjustInquiryParameters()Determines whether inquiry parameters adjusted- Returns:
- true if adjusted
-
setAdjustInquiryParameters
protected void setAdjustInquiryParameters(boolean adjustInquiryParameters) Determines whether inquiry parameters adjustedUsed internally
- Parameters:
adjustInquiryParameters-
-
setFieldBindingInfo
Sets the field binding informationSets the field binding information
- Parameters:
fieldBindingInfo-
-