You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Ryan Wynn <bi...@gmail.com> on 2005/11/04 20:16:03 UTC

[shale] clay storing id state in attributes

I think the change to save id state in the attributes collection broke use
of commons validator.
 It's throwing runtime exception in PropertyValueCommand:
  try {
PropUtils.setProperty(child, attributeBean.getName(), expr);
} catch (Exception e) {
if (child instanceof UIComponentBase)
((UIComponentBase) child).getAttributes().put(attributeBean.getName(),
expr);
else
throw e;
}
 Now that id is in attributes collection, PropertValueCommand tries to setId
on CommonsValidator which does not have this property.
And since it's not instanceof UIComponentBase, you get throw e.
 Maybe the code above should check if child is instanceof
javax.faces.validator.Validator and not throw exception in that case. I
don't believe that validators necessarily need ids?