|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.barracudamvc.core.forms.DefaultFormElement
org.barracudamvc.contrib.dbroggisch.repopulation.SelectFormElement
public class SelectFormElement
Use this FormElement to repopulate the request value into a select box created by the <select>-tag.
Field Summary |
---|
Fields inherited from class org.barracudamvc.core.forms.DefaultFormElement |
---|
allowMultiples, defaultVal, format, key, name, origVal, parent, pe, type, val, validator |
Constructor Summary | |
---|---|
SelectFormElement(ListModel lm,
ListSelectionModel lsm,
String ikey,
FormType itype,
Object idefaultVal,
FormValidator ivalidator)
Creates a new SelectFormElement instance. |
|
SelectFormElement(ListModel lm,
ListSelectionModel lsm,
String ikey,
String iname,
FormType itype,
Object idefaultVal,
FormValidator ivalidator,
boolean iallowMultiples)
Creates a new SelectFormElement instance. |
|
SelectFormElement(ListModel lm,
String ikey,
FormType itype,
Object idefaultVal,
FormValidator ivalidator,
boolean iallowMultiples)
Creates a new SelectFormElement instance. |
|
SelectFormElement(ListModel lm,
String ikey,
String iname,
FormType itype,
Object idefaultVal,
FormValidator ivalidator,
boolean iallowMultiples)
Creates a new SelectFormElement instance. |
|
SelectFormElement(String ikey,
FormType itype,
Object idefaultVal,
FormValidator ivalidator)
Creates a new SelectFormElement instance. |
|
SelectFormElement(String ikey,
String iname,
FormType itype,
Object idefaultVal,
FormValidator ivalidator,
boolean iallowMultiples)
Creates a new SelectFormElement instance. |
Method Summary | |
---|---|
static ListSelectionModel |
calcListSelectionModel(List vals,
List sel,
int selType)
A convenience method that takes two lists, the latter beeing a subset of the first, and computes the ListSelectionModel for them. |
static int |
calcSelectionMode(List vals,
List sel)
This is a helper method that takes a list of permitted values, and a subset of selected values out of the former list. |
static int |
calcSelectionMode(ListSelectionModel lsm)
This method computes the actual mode for the given ListSelectionModel. |
ListModel |
getListModel()
Get the list of allowed values. |
ListSelectionModel |
getListSelectionModel()
Get the ListSelectionModel. |
Object |
render(ViewContext context)
Describe render method here. |
void |
setListModel(ListModel lm)
Set the list of allowed values. |
void |
setListSelectionModel(ListSelectionModel lsm)
Set the ListSelectionModel that determines which entries of the select box are rendered. |
Methods inherited from class org.barracudamvc.core.forms.DefaultFormElement |
---|
allowMultiples, compareTo, getDefaultVal, getFormat, getKey, getName, getOrigVal, getParentForm, getParseException, getType, getVal, getVal, getValidator, getVals, getVals, setAllowMultiples, setDefaultVal, setFormat, setKey, setName, setOrigVal, setParentForm, setParseException, setType, setVal, setValidator, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SelectFormElement(String ikey, String iname, FormType itype, Object idefaultVal, FormValidator ivalidator, boolean iallowMultiples)
SelectFormElement
instance.
ikey
- a java.lang.String
valueiname
- a java.lang.String
valueitype
- a FormType
valueidefaultVal
- a java.lang.Object
valueivalidator
- a FormValidator
valueiallowMultiples
- a boolean
valuepublic SelectFormElement(ListModel lm, String ikey, String iname, FormType itype, Object idefaultVal, FormValidator ivalidator, boolean iallowMultiples)
SelectFormElement
instance.
lm
- a ListModel
valueikey
- a java.lang.String
valueiname
- a java.lang.String
valueitype
- a FormType
valueidefaultVal
- a java.lang.Object
valueivalidator
- a FormValidator
valueiallowMultiples
- a boolean
valuepublic SelectFormElement(ListModel lm, String ikey, FormType itype, Object idefaultVal, FormValidator ivalidator, boolean iallowMultiples)
SelectFormElement
instance.
lm
- a ListModel
valueikey
- a java.lang.String
valueitype
- a FormType
valueidefaultVal
- a java.lang.Object
valueivalidator
- a FormValidator
valueiallowMultiples
- a boolean
valuepublic SelectFormElement(ListModel lm, ListSelectionModel lsm, String ikey, String iname, FormType itype, Object idefaultVal, FormValidator ivalidator, boolean iallowMultiples)
SelectFormElement
instance.
lm
- a ListModel
valuelsm
- a ListSelectionModel
valueikey
- a java.lang.String
valueiname
- a java.lang.String
valueitype
- a FormType
valueidefaultVal
- a java.lang.Object
valueivalidator
- a FormValidator
valueiallowMultiples
- a boolean
valuepublic SelectFormElement(String ikey, FormType itype, Object idefaultVal, FormValidator ivalidator)
SelectFormElement
instance.
ikey
- a java.lang.String
valueitype
- a FormType
valueidefaultVal
- a java.lang.Object
valueivalidator
- a FormValidator
valuepublic SelectFormElement(ListModel lm, ListSelectionModel lsm, String ikey, FormType itype, Object idefaultVal, FormValidator ivalidator)
SelectFormElement
instance.
lm
- a ListModel
valuelsm
- a ListSelectionModel
valueikey
- a java.lang.String
valueitype
- a FormType
valueidefaultVal
- a java.lang.Object
valueivalidator
- a FormValidator
valueMethod Detail |
---|
public void setListModel(ListModel lm)
lm
- a ListModel
valuepublic ListModel getListModel()
ListModel
valuepublic void setListSelectionModel(ListSelectionModel lsm)
lsm
- a ListSelectionModel
valuepublic ListSelectionModel getListSelectionModel()
ListSelectionModel
valuepublic static int calcSelectionMode(List vals, List sel)
ListSelectionModel
.
vals
- a List
of permitted valuessel
- a List
which specifies a subset of vals
ListSelectionModel
public static int calcSelectionMode(ListSelectionModel lsm)
ListSelectionModel
for the range
of permitted values.
lsm
- a ListSelectionModel
value
int
valuepublic static ListSelectionModel calcListSelectionModel(List vals, List sel, int selType)
vals
- a List
valuesel
- a List
valueselType
- see ListSelectionModel
for the range
of permitted values
ListSelectionModel
valuepublic Object render(ViewContext context)
render
method here.
render
in interface RepopulationElement
context
- a ViewContext
value
Object
value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |