|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.alfresco.web.bean.generator.BaseComponentGenerator
org.alfresco.web.bean.generator.DatePickerGenerator
public class DatePickerGenerator
Generates a date picker component.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.alfresco.web.bean.generator.BaseComponentGenerator |
---|
BaseComponentGenerator.ControlType |
Constructor Summary | |
---|---|
DatePickerGenerator()
|
Method Summary | |
---|---|
javax.faces.component.UIComponent |
generate(javax.faces.context.FacesContext context,
java.lang.String id)
Dynamically generates a component in a default state |
protected javax.faces.convert.Converter |
getDefaultConverter(javax.faces.context.FacesContext context)
Retrieves the default converter for the date component |
java.lang.String |
getNoneLabel()
Returns the label to use when there is no date set. |
int |
getStartYear()
|
int |
getYearCount()
|
boolean |
isInitialiseIfNull()
|
void |
setInitialiseIfNull(boolean initialiseIfNull)
|
void |
setNoneLabel(java.lang.String noneLabel)
Sets the label to use when there is no date set. |
void |
setStartYear(int startYear)
|
protected void |
setupConverter(javax.faces.context.FacesContext context,
UIPropertySheet propertySheet,
PropertySheetItem property,
org.alfresco.service.cmr.dictionary.PropertyDefinition propertyDef,
javax.faces.component.UIComponent component)
Sets up the appropriate converter for the given property |
protected void |
setupMandatoryValidation(javax.faces.context.FacesContext context,
UIPropertySheet propertySheet,
PropertySheetItem item,
javax.faces.component.UIComponent component,
boolean realTimeChecking,
java.lang.String idSuffix)
Sets up a client mandatory validation rule with the property sheet for the given item. |
void |
setYearCount(int yearCount)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DatePickerGenerator()
Method Detail |
---|
public int getStartYear()
public void setStartYear(int startYear)
startYear
- Sets the year to start counting back frompublic int getYearCount()
public void setYearCount(int yearCount)
yearCount
- Sets the number of years to showpublic boolean isInitialiseIfNull()
public void setInitialiseIfNull(boolean initialiseIfNull)
initialiseIfNull
- Determines whether the control should
initially show today's date if the model value is null.
This will also hide the None button thus disallowing
the user to set the date back to null.public java.lang.String getNoneLabel()
public void setNoneLabel(java.lang.String noneLabel)
noneLabel
- The 'None' labelpublic javax.faces.component.UIComponent generate(javax.faces.context.FacesContext context, java.lang.String id)
IComponentGenerator
context
- FacesContextid
- Optional id for the newly created component, if null
is passed a unique id is generated
protected void setupConverter(javax.faces.context.FacesContext context, UIPropertySheet propertySheet, PropertySheetItem property, org.alfresco.service.cmr.dictionary.PropertyDefinition propertyDef, javax.faces.component.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 propertyprotected void setupMandatoryValidation(javax.faces.context.FacesContext context, UIPropertySheet propertySheet, PropertySheetItem item, javax.faces.component.UIComponent component, boolean realTimeChecking, java.lang.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 javax.faces.convert.Converter getDefaultConverter(javax.faces.context.FacesContext context)
context
- FacesContext
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |