Class RemoteFieldsHolder
- All Implemented Interfaces:
Serializable,Cloneable,Copyable,DictionaryBean,UifDictionaryBean,Component,DataBinding,Ordered,ScriptEventSupport,LifecycleElement,org.springframework.core.Ordered
Container list of items that will be invoked to
retrieve a list of RemotableAttributeField instances which will then be inserted into the containers
list at the position of the holder
Since remotable fields are dynamic by nature, the individual fields cannot be configured initially with the container. Further more the properties for the field are constructed with code. This gives the ability to specify where that list of fields should be placed, along with configured on how to retrieve the remote fields.
The fetching properties are used to configure what method to invoke that will return the list of remotable fields.
Specifying the getFetchingMethodToCall() only assumes the method is on the view helper service for the
contained view. For invoking other classes, such as services or static classes, use getFetchingMethodInvoker()
The list of remotable fields should bind to a Map property on the model. The getPropertyName() and
getBindingInfo() properties specify the path to this property. The property names configured on the
returned fields are assumed to be keys in that above configured map, with the corresponding map value giving the
actual model value for the remote field.
e.g. configuration
<property name="items">
<list>
<bean parent="RemoteFieldsHolder" p:propertyName="remoteFieldValuesMap"
p:fetchingMethodToCall="retrieveRemoteFields"/>
...
This example will invoke a method named 'retrieveRemoteFields' on the view helper service, which should return
a list of RemotableAttributeField instances. The view, model instance, and parent container will be sent
to the method as arguments.
The returned fields will be translated to InputField instances that bind to a map property named
'remoteFieldValuesMap' on the model.
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
- See Also:
-
Field Summary
Fields 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 TypeMethodDescriptionInvokes the configured fetching method to retrieve a list of remotable fields, then invoked theComponentFactoryto translate the fields, and finally sets up the binding for the attribute fieldsCan be used to for more complex binding pathsThe name for the component typeConfiguration for the method to invoke for retrieving the list of remotable fieldsName of the method to invoke for retrieving the list of remotable fieldsPath to the Map property that the translated fields bind tovoidsetBindingInfo(BindingInfo bindingInfo) Setter for the Map property binding info instancevoidsetFetchingMethodInvoker(MethodInvokerConfig fetchingMethodInvoker) Setter for the fetching method to invoke configurationvoidsetFetchingMethodToCall(String fetchingMethodToCall) Setter for the fetching method to callvoidsetPropertyName(String propertyName) Setter for the property name that points to the binding MapMethods inherited from class org.kuali.rice.krad.uif.component.ComponentBase
addAriaAttribute, addDataAttribute, addScriptDataAttribute, addStyleClass, addWrapperCssClass, afterEvaluateExpression, 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, performFinalize, 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, afterEvaluateExpression, 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, performFinalize, 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
-
Constructor Details
-
RemoteFieldsHolder
public RemoteFieldsHolder()
-
-
Method Details
-
fetchAndTranslateRemoteFields
Invokes the configured fetching method to retrieve a list of remotable fields, then invoked theComponentFactoryto translate the fields, and finally sets up the binding for the attribute fields- Parameters:
parent- container instance that holder is configured for, sent to the fetching method- Returns:
- list of attribute fields that should be placed into container, if no remotable fields were returned from the fetching method the list will be empty
-
getComponentTypeName
Description copied from interface:ComponentThe name for the component typeThis is used within the rendering layer to pass the component instance into the template. The component instance is exported under the name given by this method.
- Specified by:
getComponentTypeNamein interfaceComponent- Returns:
- String type name
-
getPropertyName
Path to the Map property that the translated fields bind toIt is assumed this property points to a Map where the property names on the returned remotable fields are keys in that map, with the corresponding map value giving the model value for the field
- Specified by:
getPropertyNamein interfaceDataBinding- Returns:
- path to property on model
-
setPropertyName
Setter for the property name that points to the binding Map- Parameters:
propertyName-
-
getBindingInfo
Can be used to for more complex binding pathsGenerally not necessary to set on a field level, any default object path or binding prefixes set on the view or container will be inherited
- Specified by:
getBindingInfoin interfaceDataBinding- Returns:
- BindingInfo instance containing binding information for the Map property
- See Also:
-
setBindingInfo
Setter for the Map property binding info instance- Specified by:
setBindingInfoin interfaceDataBinding- Parameters:
bindingInfo-
-
getFetchingMethodToCall
Name of the method to invoke for retrieving the list of remotable fieldsWhen only the fetching method to call is configured it is assumed to be a valid method on the view helper service for the containing view. The method name must accept the view, model object, and parent container as arguments, and return a list of
RemotableAttributeFieldinstances.For invoking the method on classes other than the view helper service, see
getFetchingMethodInvoker()- Returns:
- name of method to invoke for fetching remote fields
-
setFetchingMethodToCall
Setter for the fetching method to call- Parameters:
fetchingMethodToCall-
-
getFetchingMethodInvoker
Configuration for the method to invoke for retrieving the list of remotable fieldsThrough the method invoker config, a service or static class can be configured along with the method name that will be invoked. The method name must accept the view, model object, and parent container as arguments, and return a list of
RemotableAttributeFieldinstances.Note the
MethodInvokerConfig.getTargetMethod()property can be configured, or thegetFetchingMethodToCall(). In the case of both configurations, the target method on the method invoker config will be used- Returns:
- MethodInvokerConfig instance containing method configuration
-
setFetchingMethodInvoker
Setter for the fetching method to invoke configuration- Parameters:
fetchingMethodInvoker-
-