Hello,
I'm currently trying to deploy a seam 2 application from JBoss AS 4 to JBoss AS 7.
I've having an issue with the javax.el.MapELResolver.getType() method. Indeed, the method in indirectly called from org.jboss.seam.ui.component.UIEnumItem.getValue(), so I need to get an Enum type.
In JBoss AS 4 it was working fine as the server came with JBoss' own implementation of javax.el, the code of the method was :
public Class<?> getType(ELContext context, Object base, Object property) throws NullPointerException, PropertyNotFoundException, ELException
{
if (context == null) {
throw new NullPointerException();
}
if (base instanceof Map) {
context.setPropertyResolved(true);
Object obj = ((Map)base).get(property);
return ((obj != null) ? obj.getClass() : null);
}
return null;
}
So, I was getting to right type of the property.
JBoss AS7 comes with Sun'simplementation and has the following code:
public Class<?> getType(ELContext context, Object base, Object property)
{
if (context == null) {
throw new NullPointerException();
}
if ((base != null) && ((base instanceof Map))) {
context.setPropertyResolved(true);
return Object.class;
}
return null;
}
So, I always get Object.class and so can't get UIEnumItem to work. Is there a reason for this change on JBoss AS 7 ? Looks like a regression to me....
Thank you