GridTabWrapper is not parsing correctly booleans

https://sourceforge.net/tracker/?func=detail&atid=879332&aid=2945469&group_id=176962

Link to SF Tracker: http://sourceforge.net/support/tracker.php?aid=2945469
This commit is contained in:
teo_sarca 2010-02-05 09:44:38 +00:00
parent ea9349b5cc
commit 9583fa45dd
1 changed files with 4 additions and 2 deletions

View File

@ -102,13 +102,15 @@ public class GridTabWrapper implements InvocationHandler
GridField field = m_gridTab.getField(propertyName); GridField field = m_gridTab.getField(propertyName);
if (field != null) if (field != null)
{ {
return field.getValue(); final Object value = field.getValue();
return value instanceof Boolean ? value : "Y".equals(value);
} }
// //
field = m_gridTab.getField("Is"+propertyName); field = m_gridTab.getField("Is"+propertyName);
if (field != null) if (field != null)
{ {
return field.getValue(); final Object value = field.getValue();
return value instanceof Boolean ? value : "Y".equals(value);
} }
// //
throw new IllegalArgumentException("Method not supported - "+methodName); throw new IllegalArgumentException("Method not supported - "+methodName);