public void restoreState(FacesContext context, Object state) {
  Object[] values = (Object[]) state;
  super.restoreState(context, values[0]);
  //Don' do this; it will fail on you!!!
  //listenerPointers = (Map<String, ArrayList<Class<? extends ActionListener>>>) values[1];
  //This will work!!!
  listenerPointers = (Map<String, ArrayList<Class<? extends ActionListener>>>) restoreAttachedState(context,values[1]);
}
Notice the call to restoreAttachedState(facesContext, value)."saveAttachedState(facesContext, value) is the saveState() counter-part.
Both are static methods in UIComponentBase class.
0 comments:
Post a Comment