If you are using facelets, you could create EL casting functions. Example:
public static Integer getInteger(Object value) {
if (value == null) {
return null;
} else if (value instanceof Number) {
return new Integer(((Number)value).intValue());
} else {
try {
return Integer.parseInt(value.toString());
} catch (NumberFormatException ex) {
return "NaN";
}
}
}
// Repeat for Double, Float, Long, etc.
then use:
<f:selectItem itemLabel="2009" itemValue="#{my:getInteger(2009)}" />
On 7/25/07, Svilen Ivanov <[EMAIL PROTECTED]> wrote:
Marcus Beyer wrote:
[...]
>>
>> Please see the WIKI as it is documented there.
>
> Where? <http://wiki.apache.org/myfaces/>? I cannot find anything about it.
Check this wiki page:
http://wiki.apache.org/myfaces/Tomahawk_1%2e1%2e4_to_1%2e1%2e5
Regards
--
Svilen Ivanov
http://svilen-online.blogspot.com
There is no dark side of the moon really.
Matter of fact it's all dark.