net.sf.tacos.formatter
Class MaskJsFormatter

java.lang.Object
  extended by net.sf.tacos.formatter.MaskJsFormatter
All Implemented Interfaces:
JsFormatter

public class MaskJsFormatter
extends Object
implements JsFormatter

Javascript formatting renderer for numbers. The following parameters are allowed in the initializer:

Parameter Name Description Default
format The mask formatting string. See MaskFormatter for details.  

Author:
lquijano

Field Summary
static String FORMATTER_SCRIPT_RESOURCE
          Classpath for formatter script.
 
Constructor Summary
MaskJsFormatter()
          Default constructor, required by BeanFactory.
MaskJsFormatter(String initializer)
          Constructor with initializer, required by BeanFactory.
 
Method Summary
 String getFormat()
           
 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 setFormat(String format)
           
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FORMATTER_SCRIPT_RESOURCE

public static final String FORMATTER_SCRIPT_RESOURCE
Classpath for formatter script.

See Also:
Constant Field Values
Constructor Detail

MaskJsFormatter

public MaskJsFormatter()
Default constructor, required by BeanFactory.


MaskJsFormatter

public MaskJsFormatter(String initializer)
Constructor with initializer, required by BeanFactory.

Method Detail

renderContributions

public 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).

Specified by:
renderContributions in interface JsFormatter
Parameters:
cycle - Tapestry request cycle.
scriptSource - Tapestry script source.
comp - the component.
uniqueId - optional unique Id to override the component's id.

getFormat

public String getFormat()
Returns:
Returns the format.

setFormat

public void setFormat(String format)
Parameters:
format - The format to set.

toString

public String toString()

Overrides:
toString in class Object