|
||||||||||
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 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 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 Message |
getInstructionalMessage()
Gets the default instructional message configuration |
static Label |
getLabel()
Gets the label |
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 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 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 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 |
---|
protected static final String TEXT_CONTROL
protected static final String CHECKBOX_CONTROL
protected static final String HIDDEN_CONTROL
protected static final String TEXTAREA_CONTROL
protected static final String SELECT_CONTROL
protected static final String CHECKBOX_GROUP_CONTROL
protected static final String CHECKBOX_GROUP_CONTROL_HORIZONTAL
protected static final String RADIO_GROUP_CONTROL
protected static final String RADIO_GROUP_CONTROL_HORIZONTAL
protected static final String FILE_CONTROL
protected static final String DATE_CONTROL
protected static final String USER_CONTROL
protected static final String GROUP_CONTROL
protected static final String DATA_FIELD
protected static final String INPUT_FIELD
protected static final String ERRORS_FIELD
protected static final String ACTION
protected static final String ACTION_LINK
protected static final String LINK_FIELD
protected static final String IFRAME
protected static final String IMAGE_FIELD
protected static final String SPACE_FIELD
protected static final String GENERIC_FIELD
protected static final String IMAGE
protected static final String LABEL
protected static final String MESSAGE
protected static final String MESSAGE_FIELD
protected static final String FIELD_GROUP
protected static final String HORIZONTAL_FIELD_GROUP
protected static final String GROUP
protected static final String PAGE_GROUP
protected static final String GROUP_GRID_LAYOUT
protected static final String GROUP_BODY_ONLY
protected static final String GROUP_GRID_BODY_ONLY
protected static final String TAB_GROUP
protected static final String NAVIGATION_GROUP
protected static final String TREE_GROUP
protected static final String LINK_GROUP
protected static final String COLLECTION_GROUP
protected static final String COLLECTION_GROUP_TABLE_LAYOUT
protected static final String LIST_GROUP
protected static final String HEADER
protected static final String FOOTER
protected static final String FOOTER_SAVECLOSECANCEL
protected static final String CONSTRAINT_MESSAGE
protected static final String INSTRUCTIONAL_MESSAGE
protected static final String HELP_ACTION
protected static final String IMAGE_CAPTION_HEADER
protected static final String IMAGE_CUTLINE_MESSAGE
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 FieldGroup getFieldGroup()
public static FieldGroup getHorizontalFieldGroup()
public static Group getGroup()
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()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |