Index: jsf-api/src/main/java/javax/faces/component/UIComponentBase.java =================================================================== --- jsf-api/src/main/java/javax/faces/component/UIComponentBase.java (revision 10857) +++ jsf-api/src/main/java/javax/faces/component/UIComponentBase.java (working copy) @@ -1551,37 +1551,43 @@ if (state == null) { return; } - Object[] values = (Object[]) state; + try { +// LOGGER.log(Level.INFO, "attempting to restore state for " + this.getClientId(context)); + Object[] values = (Object[]) state; - if (values[0] != null) { - if (listeners == null) { - listeners = new AttachedObjectListHolder(); + if (values[0] != null) { + if (listeners == null) { + listeners = new AttachedObjectListHolder(); + } + listeners.restoreState(context, values[0]); } - listeners.restoreState(context, values[0]); - } - if (values[1] != null) { - Map m = restoreSystemEventListeners(context, values[1]); - if (listenersByEventClass != null) { - listenersByEventClass.putAll(m); - } else { - listenersByEventClass = m; + if (values[1] != null) { + Map m = restoreSystemEventListeners(context, values[1]); + if (listenersByEventClass != null) { + listenersByEventClass.putAll(m); + } else { + listenersByEventClass = m; + } } - } - if (values[2] != null) { - behaviors = restoreBehaviorsState(context, values[2]); - } - if (values[3] != null) { - bindings = restoreBindingsState(context, values[3]); - } - if(values[4] != null) { - getStateHelper().restoreState(context, values[4]); - } - if (values.length == 6) { - // this means we've saved full state and need to do a little more - // work to finish the job - if (values[5] != null) { - id = (String) values[5]; + if (values[2] != null) { + behaviors = restoreBehaviorsState(context, values[2]); } + if (values[3] != null) { + bindings = restoreBindingsState(context, values[3]); + } + if(values[4] != null) { + getStateHelper().restoreState(context, values[4]); + } + if (values.length == 6) { + // this means we've saved full state and need to do a little more + // work to finish the job + if (values[5] != null) { + id = (String) values[5]; + } + } + } catch (RuntimeException re) { + LOGGER.log(Level.SEVERE, "problem restoring the state for " + this.getClientId(context), re); + throw re; } }