getValidBaseTypes has to return an Object which implements
org.apache.tapestry5.SelectModel. If you want to filter out some enum
values that shouldn't be displayed you could extend EnumSelectModel and
overwrite the getOptions() method. In your own implementation make a
call to the super class' getOptions() and remove the desired elements
from the list returned.
This just comes to my mind, there might be a more elegant method.
Uli
José Paumard schrieb:
Hello all,
My TML is the following :
<t:select t:id="basetype" t:value="basetype"/>
The baseType property is of type BaseType, an enum with several values
in it. When I declare theses values in the associated properties file,
to make them readable, everything works fine.
Now if I declare my select like that :
<t:select t:id="basetype" t:value="basetype" model="prop:validbasetypes"/>
The getValidBaseTypes returns an array of some BaseType values. Without
changing my properties file, I expect to see a subset of the BaseType
values in the drop down list (it is the case), in the same
human-readable form. This last point doesnt work, they are not
converted, I have the raw values in the drop down list.
Has anyone saw the same thing ? Is it supposed to work like that, or is
it a bug ?
Thank you,
José
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]