Hi,
I want to use an enumerated type for the different options of my
selection list. My problem is that the label of the options is always
the full qualified name of the enum type.
My toString() function is not used :(
As indicated on the Datatypes part of CForms, I have the following code :
- Form definition :
<fd:field id="procedure_type" required="true">
<fd:datatype base="enum">
<fd:convertor type="enum">
<fd:enum>org.epoline.soprano.visualisation.customModel.Tyappli</fd:enum>
</fd:convertor>
</fd:datatype>
<fd:selection-list type="enum"
class="org.epoline.soprano.visualisation.customModel.Tyappli"/>
</fd:field>
- Tyappli.class (simplified) :
public class Tyappli {
public static final Tyappli NATIONAL = new Tyappli("National", new
Short("1"));
public static final Tyappli SPC = new Tyappli("Statistical Process
Control", new Short("4"));
private String descr;
private Tyappli(String descr, Short dbInt) {
this.descr = descr;
this.dbShort = dbInt;
}
@Override
public String toString() {
return descr;
}
public static Tyappli fromString(String value) { ... }
}
I keep having this large selection list with e.g.
org.epoline.soprano.visualisation.customModel.Tyappli.NATIONAL as option.
Any idea what am I missing for this to work ?
-Baptiste
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]