dbforms
Tag setCustomFormatter
Register a Custom Formatter for later use
Example:
The registered class must implement the
org.dbforms.interface.ICustomFormat interface. A
new instance of the object will be instantiated
and initialized with the 'arg' value, this
instance will be given the name 'name'. The name
exists in the session space. Other tags that
utilize the custom formatter will use the
attribute customFormatter='xyz', where 'xyz' is
the name registered. Multiple instances of the
same object can exist with different names and
initial values for arg.
At runtime the class's setLocale() method will
be called. Then the sprintf(Object[] data)
method will be called, data will be an array of
3 values. data[0] = string of text (i.e. what
would normally be displayed), data[1] is the
current field of type Field, and data[2] is the
invoking tag of type Tag. The methods should
check for null values in the input.
Tag Information |
Tag Class |
org.dbforms.taglib.SetCustomFormatterTag
|
TagExtraInfo Class | None |
Body Content | JSP |
Display Name | None |
Attributes |
Name | Required | Request-time | Type | Description |
name | true | true | java.lang.String |
name to use, other tags will use this as the
value for the customFormatter attribute
|
className | true | true | java.lang.String | FQ ClassName to load |
arg | false | true | java.lang.Object | optional: arg passed to instance |
Variables |
No Variables Defined. |
Output Generated by
Tag Library Documentation Generator.
Java, JSP, and JavaServer Pages are trademarks or
registered trademarks of Sun Microsystems, Inc. in the US and other
countries. Copyright 2002-4 Sun Microsystems, Inc.
4150 Network Circle
Santa Clara, CA 95054, U.S.A.
All Rights Reserved.