Package org.kuali.rice.krad.uif.util
Class ComponentFactory
java.lang.Object
org.kuali.rice.krad.uif.util.ComponentFactory
Factory class for creating new UIF components from their base definitions in the dictionary.
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static List<org.kuali.rice.core.api.util.KeyValue> buildKeyValuePairs(Map<String, String> optionsMap) For each option in the given list, create a newKeyValueinstancestatic ActionGets the actionstatic ActionGets the action linkstatic CheckboxControlRetrieves a new checkbox control instance from Spring (initialized by the bean definition with the given id)static CheckboxGroupControlRetrieves a new checkbox group control instance from Spring (initialized by the bean definition with the given id)static CheckboxGroupControlRetrieves a new checkbox group control instance from Spring (initialized by the bean definition with the given id)static MessageFieldGets the collection grouping fieldstatic CollectionGroupGets the collection groupstatic CollectionGroupGets the collection group table layoutstatic CollectionGroupGets the collection group with disclosure behaviorstatic CollectionGroupGets the collection group table layout with disclosure behaviorstatic MessageGets the default constraint message configurationprotected static ControlgetControl(UifConstants.ControlType controlType) Gets the controlstatic DataFieldRetrieves a new data field instance from Spring (initialized by the bean definition with the given id)static DataFieldgetDataField(String propertyName, String label) Retrieves a new data field instance from Spring (initialized by the bean definition with the given id) and sets the property name and label to the given parametersstatic TextControlRetrieves a new text control instance from Spring (initialized by the bean definition with the given id) configured for a date (enabled data picker)static ValidationMessagesGets the errors fieldstatic FieldGroupGets the field groupstatic FileControlRetrieves a new file control instance from Spring (initialized by the bean definition with the given id)static GroupGets the footerstatic GroupGets the footer save/close/cancelstatic GenericFieldGets the generic fieldstatic GroupgetGroup()Gets the groupstatic GroupGets the group body onlystatic GroupControlRetrieves a new text control instance from Spring (initialized by the bean definition with the given id) configured for KIM group inputstatic GroupGets the group grid body onlystatic GroupGets the group grid layoutstatic Groupstatic HeaderGets the headerstatic ActionGets the default action component configured for helpstatic HiddenControlRetrieves a new hidden control instance from Spring (initialized by the bean definition with the given id)static GroupGets the horizontal box groupstatic GroupGets the horizontal box sectionstatic FieldGroupGets the horizontal field groupstatic IframeGets the iframestatic ImagegetImage()Gets the image componentstatic HeaderGets the default image caption header configurationstatic MessageGets the default image cutline message configurationstatic ImageFieldGets the image fieldstatic InputFieldRetrieves a new input field instance from Spring (initialized by the bean definition with the given id)static InputFieldgetInputField(String propertyName, String label) Retrieves a new input field instance from Spring (initialized by the bean definition with the given id) and sets the property name and label to the given parametersstatic InputFieldgetInputField(String propertyName, String label, UifConstants.ControlType controlType) Retrieves a new input field instance from Spring (initialized by the bean definition with the given id) and sets the property name, control, and label to the given parametersstatic InputFieldgetInputField(String propertyName, String label, UifConstants.ControlType controlType, int size, int maxLength, int minLength) Retrieves a new input field instance from Spring (initialized by the bean definition with the given id) and sets the property name, control, size, min and max length, and label to the given parametersstatic InputFieldgetInputField(String propertyName, String label, UifConstants.ControlType controlType, Class<? extends org.kuali.rice.krad.keyvalues.KeyValuesFinder> optionsFinderClass) Retrieves a new input field instance from Spring (initialized by the bean definition with the given id) and sets the property name, control, options finder, and label to the given parametersstatic InputFieldgetInputField(String propertyName, String label, UifConstants.ControlType controlType, String defaultValue) Retrieves a new input field instance from Spring (initialized by the bean definition with the given id) and sets the property name, control, defaultValue, and label to the given parametersstatic InputFieldgetInputField(String propertyName, String label, UifConstants.ControlType controlType, List<org.kuali.rice.core.api.util.KeyValue> options) Retrieves a new input field instance from Spring (initialized by the bean definition with the given id) and sets the property name, control, options, and label to the given parametersstatic InquiryGets the default inquiry configurationstatic InquiryViewGets an empty inquiry view configuration for population.static MessageGets the default instructional message configurationstatic LabelgetLabel()Gets the labelstatic LightBoxGets the default lightbox configurationstatic LinkFieldGets the link fieldstatic LinkGroupGets the link groupstatic CollectionGroupGets the list groupstatic LookupInputFieldGets a component instance for an input field for the active indicator in the lookup criteria sectionstatic LookupInputFieldGets a component instance for an input field in the lookup criteria sectionstatic LookupViewGets an empty lookup view configuration for population.static MessageGets the messagestatic MessageFieldGets the message fieldstatic TabNavigationGroupGets the navigation groupstatic ComponentgetNewComponentInstance(String beanId) Returns a newComponentinstance for the given bean id from the spring factory.static ComponentgetNewInstanceForRefresh(ViewPostMetadata viewPostMetadata, String id) Returns a newComponentinstance for the given bean id from the spring factory.static PageGroupGets the page groupstatic QuickFinderGets the default quickfinder configurationstatic RadioGroupControlRetrieves a new radio group control instance from Spring (initialized by the bean definition with the given id)static RadioGroupControlRetrieves a new radio group control instance from Spring (initialized by the bean definition with the given id)static ActionReturns an instance of a secondary action component.static SelectControlRetrieves a new select control instance from Spring (initialized by the bean definition with the given id)static DialogGroupGets an instance of the session timeout dialogstatic DialogGroupGets an instance of the session timeout warning dialogstatic SpaceFieldGets the space fieldstatic TabGroupGets the tab groupstatic TextAreaControlRetrieves a new Text area control instance from Spring (initialized by the bean definition with the given id)static TextControlRetrieves a new Text control instance from Spring (initialized by the bean definition with the given id)static TreeGroupGets the tree groupstatic UrlInfoGets an instance of an UrlInfostatic UserControlRetrieves a new text control instance from Spring (initialized by the bean definition with the given id) configured for KIM user inputstatic GroupGets the vertical box groupstatic GroupGets the vertical box sectionstatic DialogGroupGets an instance of the yes no dialogstatic InputFieldtranslateRemotableField(org.kuali.rice.core.api.uif.RemotableAttributeField remotableField) Builds a newInputFieldfrom the properties set on the givenRemotableAttributeFieldstatic List<InputField> translateRemotableFields(List<org.kuali.rice.core.api.uif.RemotableAttributeField> remotableFields) For each remotable field in the given list creates a newInputFieldinstance and sets the corresponding properties from the remotable instance
-
Field Details
-
TEXT_CONTROL
- See Also:
-
CHECKBOX_CONTROL
- See Also:
-
HIDDEN_CONTROL
- See Also:
-
TEXTAREA_CONTROL
- See Also:
-
SELECT_CONTROL
- See Also:
-
CHECKBOX_CONVERTED_RADIO_CONTROL
- See Also:
-
CHECKBOX_GROUP_CONTROL
- See Also:
-
CHECKBOX_GROUP_CONTROL_HORIZONTAL
- See Also:
-
RADIO_GROUP_CONTROL
- See Also:
-
RADIO_GROUP_CONTROL_HORIZONTAL
- See Also:
-
FILE_CONTROL
- See Also:
-
DATE_CONTROL
- See Also:
-
USER_CONTROL
- See Also:
-
GROUP_CONTROL
- See Also:
-
DATA_FIELD
- See Also:
-
INPUT_FIELD
- See Also:
-
LOOKUP_ACTIVE_INPUT_FIELD
- See Also:
-
LOOKUP_INPUT_FIELD
- See Also:
-
ERRORS_FIELD
- See Also:
-
ACTION
- See Also:
-
SECONDARY_ACTION
- See Also:
-
ACTION_LINK
- See Also:
-
LINK_FIELD
- See Also:
-
IFRAME
- See Also:
-
IMAGE_FIELD
- See Also:
-
SPACE_FIELD
- See Also:
-
GENERIC_FIELD
- See Also:
-
IMAGE
- See Also:
-
LABEL
- See Also:
-
MESSAGE
- See Also:
-
MESSAGE_FIELD
- See Also:
-
COLLECTION_GROUPING_FIELD
- See Also:
-
FIELD_GROUP
- See Also:
-
HORIZONTAL_FIELD_GROUP
- See Also:
-
GROUP
- See Also:
-
VERTICAL_BOX_GROUP
- See Also:
-
HORIZONTAL_BOX_GROUP
- See Also:
-
VERTICAL_BOX_SECTION
- See Also:
-
HORIZONTAL_BOX_SECTION
- See Also:
-
PAGE_GROUP
- See Also:
-
GROUP_GRID_LAYOUT
- See Also:
-
GROUP_WITH_DISCLOSURE_GRID_LAYOUT
- See Also:
-
GROUP_BODY_ONLY
- See Also:
-
GROUP_GRID_BODY_ONLY
- See Also:
-
TAB_GROUP
- See Also:
-
NAVIGATION_GROUP
- See Also:
-
TREE_GROUP
- See Also:
-
LINK_GROUP
- See Also:
-
DIALOG_GROUP
- See Also:
-
COLLECTION_GROUP
- See Also:
-
COLLECTION_WITH_DISCLOSURE_GROUP
- See Also:
-
COLLECTION_GROUP_TABLE_LAYOUT
- See Also:
-
COLLECTION_WITH_DISCLOSURE_GROUP_TABLE_LAYOUT
- See Also:
-
LIST_GROUP
- See Also:
-
HEADER
- See Also:
-
FOOTER
- See Also:
-
FOOTER_SAVECLOSECANCEL
- See Also:
-
CONSTRAINT_MESSAGE
- See Also:
-
INSTRUCTIONAL_MESSAGE
- See Also:
-
HELP_ACTION
- See Also:
-
IMAGE_CAPTION_HEADER
- See Also:
-
IMAGE_CUTLINE_MESSAGE
- See Also:
-
LIGHTBOX
- See Also:
-
QUICKFINDER
- See Also:
-
INQUIRY
- See Also:
-
ADD_BLANK_LINE_ACTION
- See Also:
-
ADD_WITH_DIALOG_ACTION
- See Also:
-
ADD_LINE_DIALOG
- See Also:
-
DIALOG_DISMISS_ACTION
- See Also:
-
EDIT_LINE_DIALOG
- See Also:
-
EDIT_LINE_IN_DIALOG_ACTION
- See Also:
-
EDIT_LINE_IN_DIALOG_SAVE_ACTION
- See Also:
-
SESSION_TIMEOUT_WARNING_DIALOG
- See Also:
-
SESSION_TIMEOUT_DIALOG
- See Also:
-
YES_NO_DIALOG
- See Also:
-
INQUIRY_VIEW
- See Also:
-
LOOKUP_VIEW
- See Also:
-
LOOKUP_CRITERIA_FIELD
- See Also:
-
LOOKUP_CRITERIA_ACTIVE_INDICATOR_FIELD
- See Also:
-
URL_INFO
- See Also:
-
-
Constructor Details
-
ComponentFactory
public ComponentFactory()
-
-
Method Details
-
getNewInstanceForRefresh
Returns a newComponentinstance for the given bean id from the spring factory.- Parameters:
id- id for the component in the view index- Returns:
- Component new instance
-
getNewComponentInstance
Returns a newComponentinstance for the given bean id from the spring factory.- Parameters:
beanId- id of the bean definition- Returns:
- new component instance or null if no such component definition was found
-
getTextControl
Retrieves a new Text control instance from Spring (initialized by the bean definition with the given id)- Returns:
- TextControl
-
getTextAreaControl
Retrieves a new Text area control instance from Spring (initialized by the bean definition with the given id)- Returns:
- TextAreaControl
-
getCheckboxControl
Retrieves a new checkbox control instance from Spring (initialized by the bean definition with the given id)- Returns:
- CheckboxControl
-
getHiddenControl
Retrieves a new hidden control instance from Spring (initialized by the bean definition with the given id)- Returns:
- HiddenControl
-
getSelectControl
Retrieves a new select control instance from Spring (initialized by the bean definition with the given id)- Returns:
- SelectControl
-
getCheckboxGroupControl
Retrieves a new checkbox group control instance from Spring (initialized by the bean definition with the given id)Return checkbox group set for vertical orientation
- Returns:
- CheckboxGroupControl
-
getCheckboxGroupControlHorizontal
Retrieves a new checkbox group control instance from Spring (initialized by the bean definition with the given id)Return checkbox group set for horizontal orientation
- Returns:
- CheckboxGroupControl
-
getRadioGroupControl
Retrieves a new radio group control instance from Spring (initialized by the bean definition with the given id)Return radio group set for vertical orientation
- Returns:
- RadioGroupControl
-
getRadioGroupControlHorizontal
Retrieves a new radio group control instance from Spring (initialized by the bean definition with the given id)Return radio group set for horizontal orientation
- Returns:
- RadioGroupControl
-
getFileControl
Retrieves a new file control instance from Spring (initialized by the bean definition with the given id)- Returns:
- FileControl
-
getDateControl
Retrieves a new text control instance from Spring (initialized by the bean definition with the given id) configured for a date (enabled data picker)- Returns:
- TextControl
-
getUserControl
Retrieves a new text control instance from Spring (initialized by the bean definition with the given id) configured for KIM user input- Returns:
- TextControl
-
getGroupControl
Retrieves a new text control instance from Spring (initialized by the bean definition with the given id) configured for KIM group input- Returns:
- TextControl
-
getDataField
Retrieves a new data field instance from Spring (initialized by the bean definition with the given id)- Returns:
- DataField
-
getDataField
Retrieves a new data field instance from Spring (initialized by the bean definition with the given id) and sets the property name and label to the given parameters- Parameters:
propertyName- name of the property the data field should bind tolabel- label for the field- Returns:
- DataField
-
getInputField
Retrieves a new input field instance from Spring (initialized by the bean definition with the given id)- Returns:
- InputField
-
getInputField
Retrieves a new input field instance from Spring (initialized by the bean definition with the given id) and sets the property name and label to the given parameters- Parameters:
propertyName- name of the property the input field should bind tolabel- label for the field- Returns:
- InputField
-
getInputField
public static InputField getInputField(String propertyName, String label, UifConstants.ControlType controlType) Retrieves a new input field instance from Spring (initialized by the bean definition with the given id) and sets the property name, control, and label to the given parameters- Parameters:
propertyName- name of the property the input field should bind tolabel- label for the fieldcontrolType- enum that identifies the type of control to create for the input field- Returns:
- InputField
-
getInputField
public static InputField getInputField(String propertyName, String label, UifConstants.ControlType controlType, String defaultValue) Retrieves a new input field instance from Spring (initialized by the bean definition with the given id) and sets the property name, control, defaultValue, and label to the given parameters- Parameters:
propertyName- name of the property the input field should bind tolabel- label for the fieldcontrolType- enum that identifies the type of control to create for the input fielddefaultValue- default value for the property backing the input field- Returns:
- InputField
-
getInputField
public static InputField getInputField(String propertyName, String label, UifConstants.ControlType controlType, Class<? extends org.kuali.rice.krad.keyvalues.KeyValuesFinder> optionsFinderClass) Retrieves a new input field instance from Spring (initialized by the bean definition with the given id) and sets the property name, control, options finder, and label to the given parameters- Parameters:
propertyName- name of the property the input field should bind tolabel- label for the fieldcontrolType- enum that identifies the type of control to create for the input fieldoptionsFinderClass- class that will provide options for the control (assume control type is multi-value)- Returns:
- InputField
-
getInputField
public static InputField getInputField(String propertyName, String label, UifConstants.ControlType controlType, List<org.kuali.rice.core.api.util.KeyValue> options) Retrieves a new input field instance from Spring (initialized by the bean definition with the given id) and sets the property name, control, options, and label to the given parameters- Parameters:
propertyName- name of the property the input field should bind tolabel- label for the fieldcontrolType- enum that identifies the type of control to create for the input fieldoptions- list of key value objects to set as the controls options- Returns:
- InputField
-
getInputField
public static InputField getInputField(String propertyName, String label, UifConstants.ControlType controlType, int size, int maxLength, int minLength) Retrieves a new input field instance from Spring (initialized by the bean definition with the given id) and sets the property name, control, size, min and max length, and label to the given parameters- Parameters:
propertyName- name of the property the input field should bind tolabel- label for the fieldcontrolType- enum that identifies the type of control to create for the input fieldsize- size for the controlmaxLength- max length for the field's value (also used for the control)minLength- min length for the field's value (also used for the control)- Returns:
- InputField
-
translateRemotableField
public static InputField translateRemotableField(org.kuali.rice.core.api.uif.RemotableAttributeField remotableField) Builds a newInputFieldfrom the properties set on the givenRemotableAttributeFieldNote the returned InputField will not be initialized yet. Its state will be that of the initial object returned from the UIF dictionary with the properties set from the remotable attribute field, thus it is really just a more configuration complete field
- Parameters:
remotableField- field defined by a remove attribute- Returns:
- AttributeField instance built from remotable field
-
translateRemotableFields
public static List<InputField> translateRemotableFields(List<org.kuali.rice.core.api.uif.RemotableAttributeField> remotableFields) For each remotable field in the given list creates a newInputFieldinstance and sets the corresponding properties from the remotable instance- Parameters:
remotableFields- list of remotable fields to translate- Returns:
- List
list of attribute fields built from the remotable field properties
-
buildKeyValuePairs
protected static List<org.kuali.rice.core.api.util.KeyValue> buildKeyValuePairs(Map<String, String> optionsMap) For each option in the given list, create a newKeyValueinstance- Parameters:
optionsMap- list of options- Returns:
- List
list of key values built from the list of options
-
getControl
Gets the control- Parameters:
controlType-- Returns:
- the control based on the control type
-
getErrorsField
Gets the errors field- Returns:
- ValidationMessages errors field
-
getAction
Gets the action- Returns:
- action
-
getSecondaryAction
Returns an instance of a secondary action component.- Returns:
- action
-
getActionLink
Gets the action link- Returns:
- action link
-
getLinkField
Gets the link field- Returns:
- link field
-
getIframe
Gets the iframe- Returns:
- iframe
-
getImageField
Gets the image field- Returns:
- image field
-
getImage
Gets the image component- Returns:
- image field
-
getSpaceField
Gets the space field- Returns:
- space field
-
getGenericField
Gets the generic field- Returns:
- generic field
-
getLabel
Gets the label- Returns:
- label
-
getMessage
Gets the message- Returns:
- message
-
getMessageField
Gets the message field- Returns:
- message field
-
getColGroupingField
Gets the collection grouping field- Returns:
- message field
-
getFieldGroup
Gets the field group- Returns:
- field group
-
getHorizontalFieldGroup
Gets the horizontal field group- Returns:
- horizontal field group
-
getGroup
Gets the group- Returns:
- group
-
getVerticalBoxGroup
Gets the vertical box group- Returns:
- group
-
getHorizontalBoxGroup
Gets the horizontal box group- Returns:
- group
-
getVerticalBoxSection
Gets the vertical box section- Returns:
- group
-
getHorizontalBoxSection
Gets the horizontal box section- Returns:
- group
-
getPageGroup
Gets the page group- Returns:
- page group
-
getGroupGridLayout
Gets the group grid layout- Returns:
- group grid layout
-
getGroupWithDisclosureGridLayout
-
getGroupBodyOnly
Gets the group body only- Returns:
- group body only
-
getGroupGridBodyOnly
Gets the group grid body only- Returns:
- group grid body only
-
getTabGroup
Gets the tab group- Returns:
- tab group
-
getTreeGroup
Gets the tree group- Returns:
- tree group
-
getLinkGroup
Gets the link group- Returns:
- link group
-
getCollectionGroup
Gets the collection group- Returns:
- collection group
-
getCollectionWithDisclosureGroup
Gets the collection group with disclosure behavior- Returns:
- collection group
-
getCollectionGroupTableLayout
Gets the collection group table layout- Returns:
- collection group table layout
-
getCollectionWithDisclosureGroupTableLayout
Gets the collection group table layout with disclosure behavior- Returns:
- collection group table layout
-
getListGroup
Gets the list group- Returns:
- list group
-
getHeader
Gets the header- Returns:
- header
-
getHelpAction
Gets the default action component configured for help- Returns:
- Action for help display
-
getConstraintMessage
Gets the default constraint message configuration- Returns:
- Message component for constraint messages
-
getInstructionalMessage
Gets the default instructional message configuration- Returns:
- Message component for instructional messages
-
getImageCaptionHeader
Gets the default image caption header configuration- Returns:
- Header component for image caption headers
-
getImageCutlineMessage
Gets the default image cutline message configuration- Returns:
- Message component for image cutlines messages
-
getLightBox
Gets the default lightbox configuration- Returns:
- Lightbox component
-
getQuickFinder
Gets the default quickfinder configuration- Returns:
- QuickFinder component
-
getInquiry
Gets the default inquiry configuration- Returns:
- Inquiry component
-
getSessionTimeoutWarningDialog
Gets an instance of the session timeout warning dialog- Returns:
- instance of session timeout warning dialog
-
getSessionTimeoutDialog
Gets an instance of the session timeout dialog- Returns:
- instance of session timeout dialog
-
getYesNoDialog
Gets an instance of the yes no dialog- Returns:
- instance of yes no dialog
-
getUrlInfo
Gets an instance of an UrlInfo- Returns:
- instance of UrlInfo
-
getInquiryView
Gets an empty inquiry view configuration for population.- Returns:
- InquiryView component
-
getLookupView
Gets an empty lookup view configuration for population.- Returns:
- LookupView component
-
getLookupCriteriaInputField
Gets a component instance for an input field in the lookup criteria section- Returns:
- lookup input field instance
-
getLookupCriteriaActiveIndicatorInputField
Gets a component instance for an input field for the active indicator in the lookup criteria section- Returns:
- lookup input field instance
-