public abstract void setType(String newvalue);
@Override
public void processDecodes(FacesContext context) {
GraphValidatorState validatorState = null;
boolean wasActive = false;
Object value = getValue();
if (null != value) {
validatorState = GraphValidatorState.getState(context, value);
if (null != validatorState) {
// Reuse old value, if any.
wasActive = validatorState.isActive();
validatorState.setActive(true);
} else if (value instanceof Cloneable) {
try {
Method method = getCloneMethod(value.getClass());
validatorState = new GraphValidatorState(method.invoke(value));
validatorState.setActive(true);
GraphValidatorState.setState(context, value, validatorState);
} catch (NoSuchMethodException e) {
// do nothing, that is really not possible - clone() impemented in Object.
} catch (InvocationTargetException e) {
throw new FacesException(e);
} catch (IllegalArgumentException e) {
// do nothing, that is really not possible - method has no arguments.
} catch (IllegalAccessException e) {
throw new FacesException(e);
}
}
}
super.processDecodes(context);
if (null != validatorState) {
validatorState.setActive(wasActive);
}
}