|
||||||||||
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.Inquiry
public class Inquiry
Widget for rendering an Inquiry link or DirectInquiry action field
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).
Field Summary | |
---|---|
static String |
INQUIRY_TITLE_PREFIX
|
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 | |
---|---|
Inquiry()
|
Method Summary | |
---|---|
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)
Gets text to prepend to the inquiry link title |
String |
getBaseInquiryUrl()
Returns the URL for the inquiry 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 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 |
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(View view,
Object model,
Component 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 |
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 |
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 |
setupLink(View view,
Object model,
DataField field)
Get parent object and field name and build the inquiry link |
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 |
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 |
Field Detail |
---|
public static final String INQUIRY_TITLE_PREFIX
Constructor Detail |
---|
public Inquiry()
Method Detail |
---|
public void performFinalize(View view, Object model, Component parent)
ComponentBase
performFinalize
in interface Component
performFinalize
in class ComponentBase
view
- - view instance that should be finalized for renderingmodel
- - top level object containing the dataparent
- - parent componentComponentBase.performFinalize(org.kuali.rice.krad.uif.view.View,
java.lang.Object, org.kuali.rice.krad.uif.component.Component)
public void setupLink(View view, Object model, DataField field)
This was moved from the performFinalize because overlapping and to be used by DirectInquiry.
view
- Container Viewmodel
- modelfield
- The parent Attribute fieldpublic 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)
dataObjectClass
- data object class being inquired into
public List<Component> getComponentsForLifecycle()
Component
Used by ViewHelperService
for the various lifecycle callbacks
getComponentsForLifecycle
in interface Component
getComponentsForLifecycle
in class ComponentBase
ComponentBase.getComponentsForLifecycle()
public 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 inquiry
public void setInquiryLink(Link inquiryLink)
Link
inquiryLink
- the inquiry Link
objectpublic Action getDirectInquiryAction()
Action
that will be rendered next to the field for a direct inquiry
public 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 otherwise
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |