public class TextFieldGenerator extends BaseComponentGenerator
BaseComponentGenerator.ControlType
dataDictionary
Constructor and Description |
---|
TextFieldGenerator() |
Modifier and Type | Method and Description |
---|---|
protected UIComponent |
createComponent(FacesContext context,
UIPropertySheet propertySheet,
PropertySheetItem item)
Creates the component for the given proerty sheet item.
|
UIComponent |
generate(FacesContext context,
String id)
Dynamically generates a component in a default state
|
protected org.alfresco.repo.dictionary.constraint.ListOfValuesConstraint |
getListOfValuesConstraint(FacesContext context,
UIPropertySheet propertySheet,
PropertySheetItem item)
Retrieves the list of values constraint for the item, if it has one
|
int |
getMaxLength() |
int |
getSize() |
void |
setMaxLength(int maxLength) |
void |
setSize(int size) |
protected void |
setupConstraints(FacesContext context,
UIPropertySheet propertySheet,
PropertySheetItem property,
org.alfresco.service.cmr.dictionary.PropertyDefinition propertyDef,
UIComponent component)
Sets up client validation rules for any constraints the property has.
|
protected void |
setupConverter(FacesContext context,
UIPropertySheet propertySheet,
PropertySheetItem property,
org.alfresco.service.cmr.dictionary.PropertyDefinition propertyDef,
UIComponent component)
Sets up the appropriate converter for the given property
|
protected void |
setupMandatoryValidation(FacesContext context,
UIPropertySheet propertySheet,
PropertySheetItem item,
UIComponent component,
boolean realTimeChecking,
String idSuffix)
Sets up a client mandatory validation rule with the property
sheet for the given item.
|
addStringConstraintParam, createAndSetConverter, createOutputTextComponent, generateAndAdd, getAssociationDefinition, getControlType, getPropertyDefinition, isEnabledInEditMode, setupAssociation, setupConverter, setupMandatoryAssociationIfNecessary, setupMandatoryMarker, setupMandatoryPropertyIfNecessary, setupMultiValuePropertyIfNecessary, setupNumericRangeConstraint, setupProperty, setupRegexConstraint, setupStringLengthConstraint
public int getSize()
public void setSize(int size)
size
- Sets the size of a text fieldpublic int getMaxLength()
public void setMaxLength(int maxLength)
maxLength
- Sets the max length of the text fieldpublic UIComponent generate(FacesContext context, String id)
IComponentGenerator
context
- FacesContextid
- Optional id for the newly created component, if null
is passed a unique id is generatedprotected UIComponent createComponent(FacesContext context, UIPropertySheet propertySheet, PropertySheetItem item)
BaseComponentGenerator
createComponent
in class BaseComponentGenerator
context
- FacesContextpropertySheet
- The property sheet being generateditem
- The property or association being generatedprotected void setupMandatoryValidation(FacesContext context, UIPropertySheet propertySheet, PropertySheetItem item, UIComponent component, boolean realTimeChecking, String idSuffix)
BaseComponentGenerator
setupMandatoryValidation
in class BaseComponentGenerator
context
- FacesContextpropertySheet
- The property sheet to add the validation rule toitem
- The item being generatedcomponent
- The component representing the itemrealTimeChecking
- true to make the client validate as the user typesidSuffix
- An optional suffix to add to the client idprotected void setupConstraints(FacesContext context, UIPropertySheet propertySheet, PropertySheetItem property, org.alfresco.service.cmr.dictionary.PropertyDefinition propertyDef, UIComponent component)
BaseComponentGenerator
setupConstraints
in class BaseComponentGenerator
context
- FacesContext
propertySheet The property sheet being generatedproperty
- The property being generatedpropertyDef
- The data dictionary definition of the propertycomponent
- The component representing the propertyprotected org.alfresco.repo.dictionary.constraint.ListOfValuesConstraint getListOfValuesConstraint(FacesContext context, UIPropertySheet propertySheet, PropertySheetItem item)
context
- FacesContextpropertySheet
- The property sheet being generateditem
- The item being generatedprotected void setupConverter(FacesContext context, UIPropertySheet propertySheet, PropertySheetItem property, org.alfresco.service.cmr.dictionary.PropertyDefinition propertyDef, UIComponent component)
BaseComponentGenerator
setupConverter
in class BaseComponentGenerator
context
- FacesContextpropertySheet
- The property sheet being generatedproperty
- The property being generatedpropertyDef
- The data dictionary definition of the propertycomponent
- The component representing the propertyCopyright © 2005–2017 Alfresco Software. All rights reserved.