|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.krad.uif.util.ComponentFactory
public class ComponentFactory
Factory class for creating new UIF components from their base definitions in the dictionary
Constructor Summary | |
---|---|
ComponentFactory()
|
Method Summary | |
---|---|
protected static List<KeyValue> |
buildKeyValuePairs(Map<String,String> optionsMap)
For each option in the given list, create a new KeyValue instance |
static Action |
getAction()
Gets the action |
static Action |
getActionLink()
Gets the action link |
static CheckboxControl |
getCheckboxControl()
Retrieves a new checkbox control instance from Spring (initialized by the bean definition with the given id) |
static CheckboxGroupControl |
getCheckboxGroupControl()
Retrieves a new checkbox group control instance from Spring (initialized by the bean definition with the given id) |
static CheckboxGroupControl |
getCheckboxGroupControlHorizontal()
Retrieves a new checkbox group control instance from Spring (initialized by the bean definition with the given id) |
static MessageField |
getColGroupingField()
Gets the collection grouping field |
static CollectionGroup |
getCollectionGroup()
Gets the collection group |
static CollectionGroup |
getCollectionGroupTableLayout()
Gets the collection group table layout |
static Message |
getConstraintMessage()
Gets the default constraint message configuration |
protected static Control |
getControl(UifConstants.ControlType controlType)
Gets the control |
static DataField |
getDataField()
Retrieves a new data field instance from Spring (initialized by the bean definition with the given id) |
static DataField |
getDataField(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 parameters |
static TextControl |
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) |
static ValidationMessages |
getErrorsField()
Gets the errors field |
static FieldGroup |
getFieldGroup()
Gets the field group |
static FileControl |
getFileControl()
Retrieves a new file control instance from Spring (initialized by the bean definition with the given id) |
static Group |
getFooter()
Gets the footer |
static Group |
getFooterSaveCloseCancel()
Gets the footer save/close/cancel |
static GenericField |
getGenericField()
Gets the generic field |
static Group |
getGroup()
Gets the group |
static Group |
getGroupBodyOnly()
Gets the group body only |
static TextControl |
getGroupControl()
Retrieves a new text control instance from Spring (initialized by the bean definition with the given id) configured for KIM group input |
static Group |
getGroupGridBodyOnly()
Gets the group grid body only |
static Group |
getGroupGridLayout()
Gets the group grid layout |
static Header |
getHeader()
Gets the header |
static Action |
getHelpAction()
Gets the default action component configured for help |
static HiddenControl |
getHiddenControl()
Retrieves a new hidden control instance from Spring (initialized by the bean definition with the given id) |
static Group |
getHorizontalBoxGroup()
Gets the horizontal box group |
static Group |
getHorizontalBoxSection()
Gets the horizontal box section |
static FieldGroup |
getHorizontalFieldGroup()
Gets the horizontal field group |
static Iframe |
getIframe()
Gets the iframe |
static Image |
getImage()
Gets the image component |
static Header |
getImageCaptionHeader()
Gets the default image caption header configuration |
static Message |
getImageCutlineMessage()
Gets the default image cutline message configuration |
static ImageField |
getImageField()
Gets the image field |
static InputField |
getInputField()
Retrieves a new input field instance from Spring (initialized by the bean definition with the given id) |
static InputField |
getInputField(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 parameters |
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 |
static InputField |
getInputField(String propertyName,
String label,
UifConstants.ControlType controlType,
Class<? extends 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 |
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 |
static InputField |
getInputField(String propertyName,
String label,
UifConstants.ControlType controlType,
List<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 |
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 |
static Inquiry |
getInquiry()
Gets the default inquiry configuration |
static Message |
getInstructionalMessage()
Gets the default instructional message configuration |
static Label |
getLabel()
Gets the label |
static LightBox |
getLightBox()
Gets the default lightbox configuration |
static LinkField |
getLinkField()
Gets the link field |
static LinkGroup |
getLinkGroup()
Gets the link group |
static CollectionGroup |
getListGroup()
Gets the list group |
static Message |
getMessage()
Gets the message |
static MessageField |
getMessageField()
Gets the message field |
static NavigationGroup |
getNavigationGroup()
Gets the navigation group |
static Component |
getNewComponentInstance(String beanId)
Returns a new Component instance for the given bean id from the spring factory |
static Component |
getNewInstanceForRefresh(View view,
String id)
Gets a fresh copy of the component by the id passed in which used to look up the component in the view index, then retrieve a new instance with initial state configured using the factory id |
static PageGroup |
getPageGroup()
Gets the page group |
static QuickFinder |
getQuickFinder()
Gets the default quickfinder configuration |
static RadioGroupControl |
getRadioGroupControl()
Retrieves a new radio group control instance from Spring (initialized by the bean definition with the given id) |
static RadioGroupControl |
getRadioGroupControlHorizontal()
Retrieves a new radio group control instance from Spring (initialized by the bean definition with the given id) |
static SelectControl |
getSelectControl()
Retrieves a new select control instance from Spring (initialized by the bean definition with the given id) |
static DialogGroup |
getSessionTimeoutDialog()
Gets an instance of the session timeout dialog |
static DialogGroup |
getSessionTimeoutWarningDialog()
Gets an instance of the session timeout warning dialog |
static SpaceField |
getSpaceField()
Gets the space field |
static TabGroup |
getTabGroup()
Gets the tab group |
static TextAreaControl |
getTextAreaControl()
Retrieves a new Text area control instance from Spring (initialized by the bean definition with the given id) |
static TextControl |
getTextControl()
Retrieves a new Text control instance from Spring (initialized by the bean definition with the given id) |
static TreeGroup |
getTreeGroup()
Gets the tree group |
static TextControl |
getUserControl()
Retrieves a new text control instance from Spring (initialized by the bean definition with the given id) configured for KIM user input |
static Group |
getVerticalBoxGroup()
Gets the vertical box group |
static Group |
getVerticalBoxSection()
Gets the vertical box section |
static InputField |
translateRemotableField(RemotableAttributeField remotableField)
Builds a new InputField from the properties set on the
given RemotableAttributeField |
static List<InputField> |
translateRemotableFields(List<RemotableAttributeField> remotableFields)
For each remotable field in the given list creates a new InputField
instance and sets the
corresponding properties from the remotable instance |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String TEXT_CONTROL
public static final String CHECKBOX_CONTROL
public static final String HIDDEN_CONTROL
public static final String TEXTAREA_CONTROL
public static final String SELECT_CONTROL
public static final String CHECKBOX_GROUP_CONTROL
public static final String CHECKBOX_GROUP_CONTROL_HORIZONTAL
public static final String RADIO_GROUP_CONTROL
public static final String RADIO_GROUP_CONTROL_HORIZONTAL
public static final String FILE_CONTROL
public static final String DATE_CONTROL
public static final String USER_CONTROL
public static final String GROUP_CONTROL
public static final String DATA_FIELD
public static final String INPUT_FIELD
public static final String ERRORS_FIELD
public static final String ACTION
public static final String ACTION_LINK
public static final String LINK_FIELD
public static final String IFRAME
public static final String IMAGE_FIELD
public static final String SPACE_FIELD
public static final String GENERIC_FIELD
public static final String IMAGE
public static final String LABEL
public static final String MESSAGE
public static final String MESSAGE_FIELD
public static final String COLLECTION_GROUPING_FIELD
public static final String FIELD_GROUP
public static final String HORIZONTAL_FIELD_GROUP
public static final String GROUP
public static final String VERTICAL_BOX_GROUP
public static final String HORIZONTAL_BOX_GROUP
public static final String VERTICAL_BOX_SECTION
public static final String HORIZONTAL_BOX_SECTION
public static final String PAGE_GROUP
public static final String GROUP_GRID_LAYOUT
public static final String GROUP_BODY_ONLY
public static final String GROUP_GRID_BODY_ONLY
public static final String TAB_GROUP
public static final String NAVIGATION_GROUP
public static final String TREE_GROUP
public static final String LINK_GROUP
public static final String COLLECTION_GROUP
public static final String COLLECTION_GROUP_TABLE_LAYOUT
public static final String LIST_GROUP
public static final String HEADER
public static final String FOOTER
public static final String FOOTER_SAVECLOSECANCEL
public static final String CONSTRAINT_MESSAGE
public static final String INSTRUCTIONAL_MESSAGE
public static final String HELP_ACTION
public static final String IMAGE_CAPTION_HEADER
public static final String IMAGE_CUTLINE_MESSAGE
public static final String LIGHTBOX
public static final String QUICKFINDER
public static final String INQUIRY
public static final String ADD_BLANK_LINE_ACTION
public static final String ADD_VIA_LIGHTBOX_ACTION
public static final String SESSION_TIMEOUT_WARNING_DIALOG
public static final String SESSION_TIMEOUT_DIALOG
Constructor Detail |
---|
public ComponentFactory()
Method Detail |
---|
public static Component getNewInstanceForRefresh(View view, String id)
id
- id for the component in the view index
public static Component getNewComponentInstance(String beanId)
Component
instance for the given bean id from the spring factory
beanId
- id of the bean definition
public static TextControl getTextControl()
public static TextAreaControl getTextAreaControl()
public static CheckboxControl getCheckboxControl()
public static HiddenControl getHiddenControl()
public static SelectControl getSelectControl()
public static CheckboxGroupControl getCheckboxGroupControl()
Return checkbox group set for vertical orientation
public static CheckboxGroupControl getCheckboxGroupControlHorizontal()
Return checkbox group set for horizontal orientation
public static RadioGroupControl getRadioGroupControl()
Return radio group set for vertical orientation
public static RadioGroupControl getRadioGroupControlHorizontal()
Return radio group set for horizontal orientation
public static FileControl getFileControl()
public static TextControl getDateControl()
public static TextControl getUserControl()
public static TextControl getGroupControl()
public static DataField getDataField()
public static DataField getDataField(String propertyName, String label)
propertyName
- name of the property the data field should bind tolabel
- label for the field
public static InputField getInputField()
public static InputField getInputField(String propertyName, String label)
propertyName
- name of the property the input field should bind tolabel
- label for the field
public static InputField getInputField(String propertyName, String label, UifConstants.ControlType controlType)
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
public static InputField getInputField(String propertyName, String label, UifConstants.ControlType controlType, String defaultValue)
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
public static InputField getInputField(String propertyName, String label, UifConstants.ControlType controlType, Class<? extends KeyValuesFinder> optionsFinderClass)
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)
public static InputField getInputField(String propertyName, String label, UifConstants.ControlType controlType, List<KeyValue> options)
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
public static InputField getInputField(String propertyName, String label, UifConstants.ControlType controlType, int size, int maxLength, int minLength)
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)
public static InputField translateRemotableField(RemotableAttributeField remotableField)
InputField
from the properties set on the
given RemotableAttributeField
Note 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
public static List<InputField> translateRemotableFields(List<RemotableAttributeField> remotableFields)
InputField
instance and sets the
corresponding properties from the remotable instance
remotableFields
- list of remotable fields to translate
protected static List<KeyValue> buildKeyValuePairs(Map<String,String> optionsMap)
KeyValue
instance
optionsMap
- list of options
protected static Control getControl(UifConstants.ControlType controlType)
controlType
-
public static ValidationMessages getErrorsField()
public static Action getAction()
public static Action getActionLink()
public static LinkField getLinkField()
public static Iframe getIframe()
public static ImageField getImageField()
public static Image getImage()
public static SpaceField getSpaceField()
public static GenericField getGenericField()
public static Label getLabel()
public static Message getMessage()
public static MessageField getMessageField()
public static MessageField getColGroupingField()
public static FieldGroup getFieldGroup()
public static FieldGroup getHorizontalFieldGroup()
public static Group getGroup()
public static Group getVerticalBoxGroup()
public static Group getHorizontalBoxGroup()
public static Group getVerticalBoxSection()
public static Group getHorizontalBoxSection()
public static PageGroup getPageGroup()
public static Group getGroupGridLayout()
public static Group getGroupBodyOnly()
public static Group getGroupGridBodyOnly()
public static TabGroup getTabGroup()
public static NavigationGroup getNavigationGroup()
public static TreeGroup getTreeGroup()
public static LinkGroup getLinkGroup()
public static CollectionGroup getCollectionGroup()
public static CollectionGroup getCollectionGroupTableLayout()
public static CollectionGroup getListGroup()
public static Header getHeader()
public static Group getFooter()
public static Group getFooterSaveCloseCancel()
public static Action getHelpAction()
public static Message getConstraintMessage()
public static Message getInstructionalMessage()
public static Header getImageCaptionHeader()
public static Message getImageCutlineMessage()
public static LightBox getLightBox()
public static QuickFinder getQuickFinder()
public static Inquiry getInquiry()
public static DialogGroup getSessionTimeoutWarningDialog()
public static DialogGroup getSessionTimeoutDialog()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |