Yes, actually. Perhaps you could get this integration started and maybe submit a JIRA enhancement with a patch :-)
If you take a look at Event, you'll see it's a AttributeSource. So is Scope, as well (anything in RequestScope or FlowScope). AttributeSource is a simple interface.
So it'd be straight forward to have:
int value = AttributeUtils.getIntAttribute(source, "myAttribute");
etc, etc...
like RequestUtils, but more flexible. You could use the Converter machinery to actually perform conversions underneath the covers. e.g:
Code:
getIntAttribute(AttributeSource source, String attributeName, int defaultValue) {
try {
return ((Integer)converterFor(value.getClass(),
Integer.class).convert(value)).intValue();
} catch (ConversionException e) {
return defaultValue;
}
}
Keith