|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.makumba.commons.formatters.FieldFormatter org.makumba.forms.html.FieldEditor
public class FieldEditor
Field Summary | |
---|---|
static String |
ERROR_NO_BOOLEAN
|
static String |
ERROR_NO_INT
|
static String |
ERROR_NO_REAL
|
static String |
extraFormattingParam
|
(package private) static String |
formName
|
(package private) static String[] |
params
|
(package private) static String[][] |
paramValues
|
(package private) static String |
suffixName
|
Constructor Summary | |
---|---|
protected |
FieldEditor()
Don't use this, use getInstance() |
Method Summary | |
---|---|
void |
checkParam(RecordFormatter rf,
int fieldIndex,
String name,
String val)
|
String |
format(RecordFormatter rf,
int fieldIndex,
Object o,
Dictionary<String,Object> formatParams)
Format the object to pure text. |
String |
formatHidden(RecordFormatter rf,
int fieldIndex,
Object o,
Dictionary<String,Object> formatParams)
|
String |
formatHiddenValue(RecordFormatter rf,
int fieldIndex,
Object o,
Dictionary<String,Object> formatParams)
Formats the value to appear in hidden input statement. |
String |
formatShow(RecordFormatter rf,
int fieldIndex,
Object o,
Dictionary<String,Object> formatParams)
|
String |
formatValue(RecordFormatter rf,
int fieldIndex,
Object o,
Dictionary<String,Object> formatParams)
Formats the value to appear in an input statement. |
String[] |
getAcceptedParams()
|
String[][] |
getAcceptedValue()
|
static String |
getExtraFormatting(RecordFormatter rf,
int fieldIndex,
Dictionary<String,Object> formatParams)
|
static String |
getInputID(RecordFormatter rf,
int fieldIndex,
Dictionary<String,Object> formatParams)
|
static String |
getInputName(RecordFormatter rf,
int fieldIndex,
Dictionary<String,Object> formatParams)
|
static String |
getInputName(RecordFormatter rf,
int fieldIndex,
String suffix)
|
static FieldFormatter |
getInstance()
|
static String |
getSuffix(RecordFormatter rf,
int fieldIndex,
Dictionary<String,Object> formatParams)
|
void |
onStartup(RecordFormatter rf,
int fieldIndex)
|
Object |
readFrom(RecordFormatter rf,
int fieldIndex,
HttpParameters p,
String suffix)
Reads, converts and validates the value present in the HttpParameters , for the FieldEditor
indicated by the given index. |
Object |
readFrom(RecordFormatter rf,
int fieldIndex,
HttpParameters p,
String suffix,
boolean allowMultipleValues)
As readFrom(RecordFormatter, int, HttpParameters, String) , but if indicated, then allowing multiple
values of the type, which might be needed e.g. for certain types/editors in search forms. |
static void |
setExtraFormatting(Dictionary<String,Object> formatParams,
String extraFormatting)
|
static void |
setFormName(Dictionary<String,Object> formatParams,
String formName)
|
static void |
setSuffix(Dictionary<String,Object> formatParams,
String suffix)
|
protected Integer |
toInt(RecordFormatter rf,
int fieldIndex,
Object o)
|
protected Double |
toReal(RecordFormatter rf,
int fieldIndex,
Object o)
|
Methods inherited from class org.makumba.commons.formatters.FieldFormatter |
---|
checkParams, equals, formatNotNull, formatNull, getDefaultValueFormat, getEmptyValueFormat, getExpr, getIntParam, getIntParamString, initExpr, resetValueFormat |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String ERROR_NO_INT
public static final String ERROR_NO_BOOLEAN
public static final String ERROR_NO_REAL
static String[] params
static String[][] paramValues
static final String suffixName
static final String formName
public static final String extraFormattingParam
Constructor Detail |
---|
protected FieldEditor()
Method Detail |
---|
public static FieldFormatter getInstance()
public String[] getAcceptedParams()
getAcceptedParams
in class FieldFormatter
public String[][] getAcceptedValue()
getAcceptedValue
in class FieldFormatter
public static String getSuffix(RecordFormatter rf, int fieldIndex, Dictionary<String,Object> formatParams)
public static void setSuffix(Dictionary<String,Object> formatParams, String suffix)
public static void setFormName(Dictionary<String,Object> formatParams, String formName)
public void checkParam(RecordFormatter rf, int fieldIndex, String name, String val)
checkParam
in class FieldFormatter
public String format(RecordFormatter rf, int fieldIndex, Object o, Dictionary<String,Object> formatParams)
FieldFormatter
format
in class FieldFormatter
rf
- TODOfieldIndex
- TODOpublic String formatShow(RecordFormatter rf, int fieldIndex, Object o, Dictionary<String,Object> formatParams)
public String formatHidden(RecordFormatter rf, int fieldIndex, Object o, Dictionary<String,Object> formatParams)
public String formatHiddenValue(RecordFormatter rf, int fieldIndex, Object o, Dictionary<String,Object> formatParams)
public String formatValue(RecordFormatter rf, int fieldIndex, Object o, Dictionary<String,Object> formatParams)
public void onStartup(RecordFormatter rf, int fieldIndex)
public static String getInputName(RecordFormatter rf, int fieldIndex, Dictionary<String,Object> formatParams)
public static String getInputName(RecordFormatter rf, int fieldIndex, String suffix)
public static String getInputID(RecordFormatter rf, int fieldIndex, Dictionary<String,Object> formatParams)
public static String getExtraFormatting(RecordFormatter rf, int fieldIndex, Dictionary<String,Object> formatParams)
public static void setExtraFormatting(Dictionary<String,Object> formatParams, String extraFormatting)
public Object readFrom(RecordFormatter rf, int fieldIndex, HttpParameters p, String suffix, boolean allowMultipleValues)
readFrom(RecordFormatter, int, HttpParameters, String)
, but if indicated, then allowing multiple
values of the type, which might be needed e.g. for certain types/editors in search forms.readFrom(RecordFormatter, int, HttpParameters, String)
; subclasses should thus override this method if
they want to allow multiple values.
public Object readFrom(RecordFormatter rf, int fieldIndex, HttpParameters p, String suffix)
HttpParameters
, for the FieldEditor
indicated by the given index.
protected Integer toInt(RecordFormatter rf, int fieldIndex, Object o)
protected Double toReal(RecordFormatter rf, int fieldIndex, Object o)
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |