|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.tacos.formatter.DateJsFormatter
public class DateJsFormatter
Javascript formatting renderer for numbers. The following parameters are allowed in the initializer:
Parameter Name | Description | Default |
---|---|---|
format |
Date/time format string. See SimpleDateFormat
for details.
|
%m/%d/%Y |
ignoreSeparators | If true, the formatter allows the user to enter the date without separators, as in: "03202006". It then formats the date. This speeds up text entry. | true |
separator | Date separator. | / |
amSymbol | Symbol for AM. | Component's locale AM symbol. |
pmSymbol | Symbol for PM. | Component's locale PM symbol. |
Field Summary | |
---|---|
static String |
FORMATTER_SCRIPT_RESOURCE
Classpath for formatter script. |
Constructor Summary | |
---|---|
DateJsFormatter()
Default constructor, required by BeanFactory . |
|
DateJsFormatter(String initializer)
Constructor with initializer, required by BeanFactory . |
Method Summary | |
---|---|
String |
getAmSymbol()
|
String |
getFormat()
|
String |
getIgnoreSeparators()
|
String |
getPmSymbol()
|
String |
getSeparator()
|
void |
renderContributions(org.apache.tapestry.IRequestCycle cycle,
org.apache.tapestry.engine.IScriptSource scriptSource,
org.apache.tapestry.IComponent comp,
String uniqueId)
Renders the formatter contributions (usually JavaScript functions). |
void |
setAmSymbol(String amSymbol)
|
void |
setFormat(String format)
|
void |
setIgnoreSeparators(String ignoreSeparators)
|
void |
setPmSymbol(String pmSymbol)
|
void |
setSeparator(String separator)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String FORMATTER_SCRIPT_RESOURCE
Constructor Detail |
---|
public DateJsFormatter()
BeanFactory
.
public DateJsFormatter(String initializer)
BeanFactory
.
Method Detail |
---|
public void renderContributions(org.apache.tapestry.IRequestCycle cycle, org.apache.tapestry.engine.IScriptSource scriptSource, org.apache.tapestry.IComponent comp, String uniqueId)
renderContributions
in interface JsFormatter
cycle
- Tapestry request cycle.scriptSource
- Tapestry script source.comp
- the component.uniqueId
- optional unique Id to override the component's id.public String getFormat()
public void setFormat(String format)
format
- The format to set.public String getIgnoreSeparators()
public void setIgnoreSeparators(String ignoreSeparators)
ignoreSeparators
- The ignoreSeparators to set.public void setAmSymbol(String amSymbol)
amSymbol
- The amSymbol to set.public String getAmSymbol()
public String getPmSymbol()
public void setPmSymbol(String pmSymbol)
pmSymbol
- The pmSymbol to set.public String getSeparator()
public void setSeparator(String separator)
separator
- The separator to set.public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |