public class Inquiry extends WidgetBase
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).
Modifier and Type | Field and Description |
---|---|
static String |
INQUIRY_TITLE_POSTFIX |
static String |
INQUIRY_TITLE_PREFIX |
templateOptions
componentCode, namespaceCode
INITIAL_ORDER_VALUE
Constructor and Description |
---|
Inquiry() |
Modifier and Type | Method and Description |
---|---|
void |
afterEvaluateExpression()
Inherits readOnly from parent if not explicitly populated.
|
void |
buildInquiryLink(Object dataObject,
String propertyName,
Class<?> inquiryObjectClass,
Map<String,String> inquiryParams)
Builds the inquiry link based on the given inquiry class and parameters
|
String |
createTitleText(Class<?> dataObjectClass,
Map<String,String> inquiryKeyValues)
Gets text to prepend to the inquiry link title
|
String |
getBaseInquiryUrl()
Returns the URL for the inquiry for which parameters will be added
|
String |
getDataObjectClassName()
Full class name the inquiry should be provided for
|
Action |
getDirectInquiryAction()
Action that will be rendered next to the field for a direct inquiry |
Link |
getInquiryLink()
Link that will be rendered for an inquiry |
Map<String,String> |
getInquiryParameters()
Map that determines what properties from a calling view will be sent to properties on the inquiry data object
|
String |
getViewName()
When multiple target inquiry views exists for the same data object class, the view name can be set to
determine which one to use
|
boolean |
isAdjustInquiryParameters()
Determines whether inquiry parameters adjusted
|
boolean |
isEnableDirectInquiry()
Indicates that the direct inquiry will not be rendered
|
protected boolean |
isParentReadOnly()
Determines whether a normal or direct inquiry should be enabled
|
void |
performFinalize(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 rendered
|
protected void |
setAdjustInquiryParameters(boolean adjustInquiryParameters)
Determines whether inquiry parameters adjusted
|
void |
setBaseInquiryUrl(String baseInquiryUrl)
Setter for the inquiry base url (domain, context, and controller)
|
void |
setDataObjectClassName(String dataObjectClassName)
Setter for the class name that inquiry should be provided for
|
void |
setDirectInquiryAction(Action directInquiryAction)
Setter for the direct inquiry
Action |
void |
setEnableDirectInquiry(boolean enableDirectInquiry)
Setter for the hideDirectInquiry flag
|
protected void |
setFieldBindingInfo(BindingInfo fieldBindingInfo)
Sets the field binding information
|
void |
setInquiryLink(Link inquiryLink)
Setter for the inquiry
Link |
void |
setInquiryParameters(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 object
|
protected void |
setParentReadOnly(boolean parentReadOnly)
Determines whether a normal or direct inquiry should be enabled
|
void |
setViewName(String viewName)
Setter for the view name configured on the inquiry view that should be invoked by the inquiry widget
|
void |
updateInquiryParameters(BindingInfo bindingInfo)
Adjusts the path on the inquiry parameter property to match the binding
path prefix of the given
BindingInfo |
getComponentTypeName
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, skipLifecycle
getExpressionGraph, getPropertyExpression, getPropertyExpressions, setExpressionGraph, setPropertyExpressions
copy, dataDictionaryPostProcessing, getComponentCode, getNamespaceCode, setComponentCode, setNamespaceCode
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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, setWrapperStyle
getExpressionGraph, getPropertyExpression, getPropertyExpressions, setExpressionGraph, setPropertyExpressions
dataDictionaryPostProcessing, getComponentCode, getNamespaceCode
checkMutable, getContainerIdSuffix, getId, getPhasePathMapping, getViewPath, getViewStatus, isFinal, isInitialized, isModelApplied, isMutable, isRender, notifyCompleted, performApplyModel, performInitialization, pushAllToContext, pushObjectToContext, setContainerIdSuffix, setId, setPhasePathMapping, setRender, setViewPath, skipLifecycle
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, setOnUnloadScript
public static final String INQUIRY_TITLE_PREFIX
public static final String INQUIRY_TITLE_POSTFIX
public Inquiry()
public void afterEvaluateExpression()
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.
afterEvaluateExpression
in interface Component
afterEvaluateExpression
in class ComponentBase
public void performFinalize(Object model, LifecycleElement parent)
Here final preparations can be made based on the updated view state.
performFinalize
in interface LifecycleElement
performFinalize
in class ComponentBase
model
- - top level object containing the dataparent
- - parent componentpublic void updateInquiryParameters(BindingInfo bindingInfo)
BindingInfo
bindingInfo
- binding info instance to copy binding path prefix frompublic void buildInquiryLink(Object dataObject, String propertyName, Class<?> inquiryObjectClass, Map<String,String> inquiryParams)
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 inquirypublic String createTitleText(Class<?> dataObjectClass, Map<String,String> inquiryKeyValues)
dataObjectClass
- data object class being inquired intopublic String getBaseInquiryUrl()
The 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
public void setBaseInquiryUrl(String baseInquiryUrl)
baseInquiryUrl
- public String getDataObjectClassName()
This 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).
public void setDataObjectClassName(String dataObjectClassName)
dataObjectClassName
- public String getViewName()
When 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
public void setViewName(String viewName)
viewName
- public Map<String,String> getInquiryParameters()
When 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)
public void setInquiryParameters(Map<String,String> inquiryParameters)
inquiryParameters
- public Link getInquiryLink()
Link
that will be rendered for an inquirypublic void setInquiryLink(Link inquiryLink)
Link
inquiryLink
- the inquiry Link
objectpublic Action getDirectInquiryAction()
Action
that will be rendered next to the field for a direct inquirypublic void setDirectInquiryAction(Action directInquiryAction)
Action
directInquiryAction
- the direct inquiry Action
public boolean isEnableDirectInquiry()
public void setEnableDirectInquiry(boolean enableDirectInquiry)
enableDirectInquiry
- protected boolean isParentReadOnly()
protected void setParentReadOnly(boolean parentReadOnly)
Used by unit tests and internally
parentReadOnly
- true if parent component is read only, false otherwisepublic boolean isAdjustInquiryParameters()
protected void setAdjustInquiryParameters(boolean adjustInquiryParameters)
Used internally
adjustInquiryParameters
- protected void setFieldBindingInfo(BindingInfo fieldBindingInfo)
Sets the field binding information
fieldBindingInfo
- Copyright © 2005–2016 The Kuali Foundation. All rights reserved.