org.kuali.rice.krad.uif.util
Class ComponentFactory

java.lang.Object
  extended by 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)

Field Summary
protected static String LABEL_FIELD
           
protected static String MESSAGE_FIELD
           
protected static String RADIO_GROUP_CONTROL
           
protected static String RADIO_GROUP_CONTROL_HORIZONTAL
           
protected static String TEXT_CONTROL
           
 
Constructor Summary
ComponentFactory()
           
 
Method Summary
static void addComponentDefinition(String componentDictionaryId, Component component)
          Adds a component instance to the factories map of components indexed by the given dictionary id
static Component getComponentById(UifFormBase form, String id)
          Gets a fresh copy of the component by the id passed in which is translated to the corresponding dictionary id
static Component getComponentByIdWithLifecycle(UifFormBase form, String id)
          Gets a fresh copy of the component by the id passed in with its lifecycle performed upon it, using the form data passed in
static LabelField getLabelField()
           
static MessageField getMessageField()
           
static Component getNewComponentInstance(String componentDictionaryId)
          Returns a new Component instance from the given component id initialized by the corresponding dictionary configuration
static RadioGroupControl getRadioGroupControl()
           
static RadioGroupControl getRadioGroupControlHorizontal()
           
static TextControl getTextControl()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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

TEXT_CONTROL

protected static final String TEXT_CONTROL
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
Constructor Detail

ComponentFactory

public ComponentFactory()
Method Detail

addComponentDefinition

public static void addComponentDefinition(String componentDictionaryId,
                                          Component component)
Adds a component instance to the factories map of components indexed by the given dictionary id

Parameters:
componentDictionaryId - - id to index component under
component - - component instance to add

getNewComponentInstance

public static Component getNewComponentInstance(String componentDictionaryId)
Returns a new Component instance from the given component id initialized by the corresponding dictionary configuration

Parameters:
componentDictionaryId - - id for the component to retrieve, note this is the id initially assigned and could be the spring generated id (if a static id was not set)
Returns:
new component instance or null if no such component definition was found

getLabelField

public static LabelField getLabelField()

getMessageField

public static MessageField getMessageField()

getTextControl

public static TextControl getTextControl()

getRadioGroupControl

public static RadioGroupControl getRadioGroupControl()

getRadioGroupControlHorizontal

public static RadioGroupControl getRadioGroupControlHorizontal()

getComponentById

public static Component getComponentById(UifFormBase form,
                                         String id)
Gets a fresh copy of the component by the id passed in which is translated to the corresponding dictionary id

Parameters:
id - - id for the component to retrieve
Returns:
Component new instance initialized from the dictionary

getComponentByIdWithLifecycle

public static Component getComponentByIdWithLifecycle(UifFormBase form,
                                                      String id)
Gets a fresh copy of the component by the id passed in with its lifecycle performed upon it, using the form data passed in

Parameters:
form - - object containing the view data
id - - id for the component to retrieve
Returns:
Component instance that has been run through the lifecycle


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.