Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.makumba.forms.html
Class booleanEditor

    java.lang.Object
      org.makumba.commons.formatters.FieldFormatter
          org.makumba.forms.html.FieldEditor
              org.makumba.forms.html.choiceEditor
                  org.makumba.forms.html.booleanEditor

    public class booleanEditor

extends choiceEditor

Boolean choice editor TODO we should be able to choose what to display & select by default (Yes or No) and what is the text to display.

Version:
  $Id: booleanEditor.java,v 1.1 May 11, 2008 9:22:57 PM manu Exp $
Author:
  Manuel Gay

Field Summary
`(package private) static String[]` | `__params`
`(package private) static String[][]` | `__paramValues`

Fields inherited from class org.makumba.forms.html.choiceEditor
`_params, _paramValues, nullOption`

Fields inherited from class org.makumba.forms.html.FieldEditor
`ERROR_NO_BOOLEAN, ERROR_NO_INT, ERROR_NO_REAL, extraFormattingParam, formName, params, paramValues, suffixName`

Constructor Summary
`protected` | `booleanEditor()` Don't use this, use getInstance()

Method Summary
`String` | `formatOptionTitle(RecordFormatter rf, int fieldIndex, Object options, int i)` Gets the title/label of option 'i'.
`String` | `formatOptionValue(RecordFormatter rf, int fieldIndex, Object val)` Formats an option value.
`String` | `formatOptionValue(RecordFormatter rf, int fieldIndex, Object opts, int i, Object val)` Formats an option value, in the sequence of options.
`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()`
`int` | `getDefaultSize(RecordFormatter rf, int fieldIndex)` Gets the default size of the select HTML box.
`static FieldFormatter` | `getInstance()`
`Object` | `getOptions(RecordFormatter rf, int fieldIndex, Dictionary<String,Object> formatParams)` Get the available options.
`int` | `getOptionsLength(RecordFormatter rf, int fieldIndex, Object opts)` Gets the number of available options.
`Object` | `getOptionValue(RecordFormatter rf, int fieldIndex, Object options, int i)` Gets the value of option 'i'.
`boolean` | `isMultiple(RecordFormatter rf, int fieldIndex)` Returns blank string, or " multiple " if multiple selections possible.
`Object` | `readFrom(RecordFormatter rf, int fieldIndex, HttpParameters par, String suffix)`

Methods inherited from class org.makumba.forms.html.choiceEditor
`format, getValueOrDefault, setNullOption, shouldRemoveNullValue`

Methods inherited from class org.makumba.forms.html.FieldEditor
`checkParam, formatHidden, formatHiddenValue, formatShow, getExtraFormatting, getInputName, getInputName, getSuffix, onStartup, setExtraFormatting, setFormName, setSuffix, toBoolean, toInt, toReal`

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

### __params

    static String[] __params

### __paramValues

    static String[][] __paramValues

Constructor Detail

### booleanEditor

    protected booleanEditor()

  Don't use this, use getInstance()

Method Detail

### getInstance

    public static FieldFormatter getInstance()

### getAcceptedParams

    public String[] getAcceptedParams()

  Overrides:
    `getAcceptedParams` in class `choiceEditor`

### getAcceptedValue

    public String[][] getAcceptedValue()

  Overrides:
    `getAcceptedValue` in class `choiceEditor`

### formatValue

    public String formatValue(RecordFormatter rf,
                              int fieldIndex,
                              Object o,
                              Dictionary<String,Object> formatParams)

  Formats the value to appear in an input statement.

  Overrides:
    `formatValue` in class `FieldEditor`

### readFrom

    public Object readFrom(RecordFormatter rf,
                           int fieldIndex,
                           HttpParameters par,
                           String suffix)

  Overrides:
    `readFrom` in class `FieldEditor`

### formatOptionTitle

    public String formatOptionTitle(RecordFormatter rf,
                                    int fieldIndex,
                                    Object options,
                                    int i)

  Description copied from class: `choiceEditor`
  Gets the title/label of option 'i'.

  Specified by:
    `formatOptionTitle` in class `choiceEditor`

### formatOptionValue

    public String formatOptionValue(RecordFormatter rf,
                                    int fieldIndex,
                                    Object opts,
                                    int i,
                                    Object val)

  Description copied from class: `choiceEditor`
  Formats an option value, in the sequence of options.

  Specified by:
    `formatOptionValue` in class `choiceEditor`

### formatOptionValue

    public String formatOptionValue(RecordFormatter rf,
                                    int fieldIndex,
                                    Object val)

  Description copied from class: `choiceEditor`
  Formats an option value.

  Specified by:
    `formatOptionValue` in class `choiceEditor`

### getDefaultSize

    public int getDefaultSize(RecordFormatter rf,
                              int fieldIndex)

  Description copied from class: `choiceEditor`
  Gets the default size of the select HTML box.

  Specified by:
    `getDefaultSize` in class `choiceEditor`

### getOptionValue

    public Object getOptionValue(RecordFormatter rf,
                                 int fieldIndex,
                                 Object options,
                                 int i)

  Description copied from class: `choiceEditor`
  Gets the value of option 'i'.

  Specified by:
    `getOptionValue` in class `choiceEditor`

### getOptions

    public Object getOptions(RecordFormatter rf,
                             int fieldIndex,
                             Dictionary<String,Object> formatParams)

  Description copied from class: `choiceEditor`
  Get the available options.

  Specified by:
    `getOptions` in class `choiceEditor`

### getOptionsLength

    public int getOptionsLength(RecordFormatter rf,
                                int fieldIndex,
                                Object opts)

  Description copied from class: `choiceEditor`
  Gets the number of available options.

  Specified by:
    `getOptionsLength` in class `choiceEditor`

### isMultiple

    public boolean isMultiple(RecordFormatter rf,
                              int fieldIndex)

  Description copied from class: `choiceEditor`
  Returns blank string, or " multiple " if multiple selections possible.

  Specified by:
    `isMultiple` in class `choiceEditor`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Docs generated on 2009-02-25 14:20