org.kuali.rice.krad.uif.util
Class ComponentFactory
java.lang.Object
org.kuali.rice.krad.uif.util.ComponentFactory
public class ComponentFactory
- extends Object
Factory class for creating new UIF components from their base definitions
in the dictionary
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
Method Summary |
protected static List<KeyValue> |
buildKeyValuePairs(Map<String,String> optionsMap)
|
static ActionField |
getActionField()
|
static ActionField |
getActionLinkField()
|
static BlankField |
getBlankField()
|
static CheckboxControl |
getCheckboxControl()
|
static CheckboxGroupControl |
getCheckboxGroupControl()
|
static CheckboxGroupControl |
getCheckboxGroupControlHorizontal()
|
static CollectionGroup |
getCollectionGroup()
|
static CollectionGroup |
getCollectionGroupTableLayout()
|
protected static Control |
getControl(UifConstants.ControlType controlType)
|
static DataField |
getDataField()
|
static DataField |
getDataField(String propertyName,
String label)
|
static TextControl |
getDateControl()
|
static ErrorsField |
getErrorsField()
|
static FieldGroup |
getFieldGroup()
|
static FileControl |
getFileControl()
|
static Group |
getFooter()
|
static Group |
getFooterSaveCloseCancel()
|
static GenericField |
getGenericField()
|
static Group |
getGroup()
|
static Group |
getGroupBodyOnly()
|
static TextControl |
getGroupControl()
|
static Group |
getGroupGridBodyOnly()
|
static Group |
getGroupGridLayout()
|
static HeaderField |
getHeader()
|
static HiddenControl |
getHiddenControl()
|
static FieldGroup |
getHorizontalFieldGroup()
|
static IframeField |
getIframeField()
|
static ImageField |
getImageField()
|
static InputField |
getInputField()
|
static InputField |
getInputField(String propertyName,
String label)
|
static InputField |
getInputField(String propertyName,
String label,
UifConstants.ControlType controlType)
|
static InputField |
getInputField(String propertyName,
String label,
UifConstants.ControlType controlType,
Class<? extends KeyValuesFinder> optionsFinderClass)
|
static InputField |
getInputField(String propertyName,
String label,
UifConstants.ControlType controlType,
int size,
int maxLength,
int minLength)
|
static InputField |
getInputField(String propertyName,
String label,
UifConstants.ControlType controlType,
List<KeyValue> options)
|
static InputField |
getInputField(String propertyName,
String label,
UifConstants.ControlType controlType,
String defaultValue)
|
static LabelField |
getLabelField()
|
static LinkField |
getLinkField()
|
static LinkGroup |
getLinkGroup()
|
static CollectionGroup |
getListGroup()
|
static MessageField |
getMessageField()
|
static NavigationGroup |
getNavigationGroup()
|
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()
|
static RadioGroupControl |
getRadioGroupControl()
|
static RadioGroupControl |
getRadioGroupControlHorizontal()
|
static SelectControl |
getSelectControl()
|
static TabGroup |
getTabGroup()
|
static TextAreaControl |
getTextAreaControl()
|
static TextControl |
getTextControl()
|
static TreeGroup |
getTreeGroup()
|
static TextControl |
getUserControl()
|
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 |
TEXT_CONTROL
protected static final String TEXT_CONTROL
- See Also:
- Constant Field Values
CHECKBOX_CONTROL
protected static final String CHECKBOX_CONTROL
- See Also:
- Constant Field Values
HIDDEN_CONTROL
protected static final String HIDDEN_CONTROL
- See Also:
- Constant Field Values
TEXTAREA_CONTROL
protected static final String TEXTAREA_CONTROL
- See Also:
- Constant Field Values
SELECT_CONTROL
protected static final String SELECT_CONTROL
- See Also:
- Constant Field Values
CHECKBOX_GROUP_CONTROL
protected static final String CHECKBOX_GROUP_CONTROL
- See Also:
- Constant Field Values
CHECKBOX_GROUP_CONTROL_HORIZONTAL
protected static final String CHECKBOX_GROUP_CONTROL_HORIZONTAL
- See Also:
- Constant Field Values
RADIO_GROUP_CONTROL
protected static final String RADIO_GROUP_CONTROL
- See Also:
- Constant Field Values
RADIO_GROUP_CONTROL_HORIZONTAL
protected static final String RADIO_GROUP_CONTROL_HORIZONTAL
- See Also:
- Constant Field Values
FILE_CONTROL
protected static final String FILE_CONTROL
- See Also:
- Constant Field Values
DATE_CONTROL
protected static final String DATE_CONTROL
- See Also:
- Constant Field Values
USER_CONTROL
protected static final String USER_CONTROL
- See Also:
- Constant Field Values
GROUP_CONTROL
protected static final String GROUP_CONTROL
- See Also:
- Constant Field Values
DATA_FIELD
protected static final String DATA_FIELD
- See Also:
- Constant Field Values
INPUT_FIELD
protected static final String INPUT_FIELD
- See Also:
- Constant Field Values
ERRORS_FIELD
protected static final String ERRORS_FIELD
- See Also:
- Constant Field Values
ACTION_FIELD
protected static final String ACTION_FIELD
- See Also:
- Constant Field Values
ACTION_LINK_FIELD
protected static final String ACTION_LINK_FIELD
- See Also:
- Constant Field Values
LINK_FIELD
protected static final String LINK_FIELD
- See Also:
- Constant Field Values
IFRAME_FIELD
protected static final String IFRAME_FIELD
- See Also:
- Constant Field Values
IMAGE_FIELD
protected static final String IMAGE_FIELD
- See Also:
- Constant Field Values
BLANK_FIELD
protected static final String BLANK_FIELD
- See Also:
- Constant Field Values
GENERIC_FIELD
protected static final String GENERIC_FIELD
- See Also:
- Constant Field Values
LABEL_FIELD
protected static final String LABEL_FIELD
- See Also:
- Constant Field Values
MESSAGE_FIELD
protected static final String MESSAGE_FIELD
- See Also:
- Constant Field Values
FIELD_GROUP
protected static final String FIELD_GROUP
- See Also:
- Constant Field Values
HORIZONTAL_FIELD_GROUP
protected static final String HORIZONTAL_FIELD_GROUP
- See Also:
- Constant Field Values
GROUP
protected static final String GROUP
- See Also:
- Constant Field Values
PAGE_GROUP
protected static final String PAGE_GROUP
- See Also:
- Constant Field Values
GROUP_GRID_LAYOUT
protected static final String GROUP_GRID_LAYOUT
- See Also:
- Constant Field Values
GROUP_BODY_ONLY
protected static final String GROUP_BODY_ONLY
- See Also:
- Constant Field Values
GROUP_GRID_BODY_ONLY
protected static final String GROUP_GRID_BODY_ONLY
- See Also:
- Constant Field Values
TAB_GROUP
protected static final String TAB_GROUP
- See Also:
- Constant Field Values
NAVIGATION_GROUP
protected static final String NAVIGATION_GROUP
- See Also:
- Constant Field Values
TREE_GROUP
protected static final String TREE_GROUP
- See Also:
- Constant Field Values
LINK_GROUP
protected static final String LINK_GROUP
- See Also:
- Constant Field Values
COLLECTION_GROUP
protected static final String COLLECTION_GROUP
- See Also:
- Constant Field Values
COLLECTION_GROUP_TABLE_LAYOUT
protected static final String COLLECTION_GROUP_TABLE_LAYOUT
- See Also:
- Constant Field Values
LIST_GROUP
protected static final String LIST_GROUP
- See Also:
- Constant Field Values
HEADER
protected static final String HEADER
- See Also:
- Constant Field Values
FOOTER
protected static final String FOOTER
- See Also:
- Constant Field Values
FOOTER_SAVECLOSECANCEL
protected static final String FOOTER_SAVECLOSECANCEL
- See Also:
- Constant Field Values
ComponentFactory
public ComponentFactory()
getNewInstanceForRefresh
public 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
- Parameters:
id
- - id for the component in the view index
- Returns:
- Component new instance
getNewComponentInstance
public static Component getNewComponentInstance(String beanId)
- Returns a new
Component
instance 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
public static TextControl getTextControl()
getTextAreaControl
public static TextAreaControl getTextAreaControl()
getCheckboxControl
public static CheckboxControl getCheckboxControl()
getHiddenControl
public static HiddenControl getHiddenControl()
getSelectControl
public static SelectControl getSelectControl()
getCheckboxGroupControl
public static CheckboxGroupControl getCheckboxGroupControl()
getCheckboxGroupControlHorizontal
public static CheckboxGroupControl getCheckboxGroupControlHorizontal()
getRadioGroupControl
public static RadioGroupControl getRadioGroupControl()
getRadioGroupControlHorizontal
public static RadioGroupControl getRadioGroupControlHorizontal()
getFileControl
public static FileControl getFileControl()
getDateControl
public static TextControl getDateControl()
getUserControl
public static TextControl getUserControl()
getGroupControl
public static TextControl getGroupControl()
getDataField
public static DataField getDataField()
getDataField
public static DataField getDataField(String propertyName,
String label)
getInputField
public static InputField getInputField()
getInputField
public static InputField getInputField(String propertyName,
String label)
getInputField
public static InputField getInputField(String propertyName,
String label,
UifConstants.ControlType controlType)
getInputField
public static InputField getInputField(String propertyName,
String label,
UifConstants.ControlType controlType,
String defaultValue)
getInputField
public static InputField getInputField(String propertyName,
String label,
UifConstants.ControlType controlType,
Class<? extends KeyValuesFinder> optionsFinderClass)
getInputField
public static InputField getInputField(String propertyName,
String label,
UifConstants.ControlType controlType,
List<KeyValue> options)
getInputField
public static InputField getInputField(String propertyName,
String label,
UifConstants.ControlType controlType,
int size,
int maxLength,
int minLength)
translateRemotableField
public static InputField translateRemotableField(RemotableAttributeField remotableField)
- Builds a new
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
- Returns:
- AttributeField instance built from remotable field
translateRemotableFields
public 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
- Parameters:
remotableFields
- - list of remotable fields to translate
- Returns:
- List list of attribute fields built from the remotable field properties
buildKeyValuePairs
protected static List<KeyValue> buildKeyValuePairs(Map<String,String> optionsMap)
getControl
protected static Control getControl(UifConstants.ControlType controlType)
getErrorsField
public static ErrorsField getErrorsField()
getActionField
public static ActionField getActionField()
getActionLinkField
public static ActionField getActionLinkField()
getLinkField
public static LinkField getLinkField()
getIframeField
public static IframeField getIframeField()
getImageField
public static ImageField getImageField()
getBlankField
public static BlankField getBlankField()
getGenericField
public static GenericField getGenericField()
getLabelField
public static LabelField getLabelField()
getMessageField
public static MessageField getMessageField()
getFieldGroup
public static FieldGroup getFieldGroup()
getHorizontalFieldGroup
public static FieldGroup getHorizontalFieldGroup()
getGroup
public static Group getGroup()
getPageGroup
public static PageGroup getPageGroup()
getGroupGridLayout
public static Group getGroupGridLayout()
getGroupBodyOnly
public static Group getGroupBodyOnly()
getGroupGridBodyOnly
public static Group getGroupGridBodyOnly()
getTabGroup
public static TabGroup getTabGroup()
getNavigationGroup
public static NavigationGroup getNavigationGroup()
getTreeGroup
public static TreeGroup getTreeGroup()
getLinkGroup
public static LinkGroup getLinkGroup()
getCollectionGroup
public static CollectionGroup getCollectionGroup()
getCollectionGroupTableLayout
public static CollectionGroup getCollectionGroupTableLayout()
getListGroup
public static CollectionGroup getListGroup()
getHeader
public static HeaderField getHeader()
getFooter
public static Group getFooter()
getFooterSaveCloseCancel
public static Group getFooterSaveCloseCancel()
Copyright © 2005-2013 The Kuali Foundation. All Rights Reserved.