[ http://issues.apache.org/jira/browse/TOMAHAWK-738?page=comments#action_12442929 ] sean schofield commented on TOMAHAWK-738: -----------------------------------------
I was under the impression the original bug Catagay was trying to fix was that Lists were not being saved by UISaveState correctly. My point is that they would be saved correctly if passed to saveAttachedState in UIComponentBase (at least if the spec were implemented properly.) I'm assuming he had a problem b/c otherwise he would not have changed the code to check for StateHolder. According to the spec, List<Serializable> should work with UIComponentBase saveAttachedState. Make sense? By the way, if this code is in Tomahawk 1.1.4 branch it needs to come out. ASAP. > SaveState fails with a java.util.List implementation other than ArrayList > ------------------------------------------------------------------------- > > Key: TOMAHAWK-738 > URL: http://issues.apache.org/jira/browse/TOMAHAWK-738 > Project: MyFaces Tomahawk > Issue Type: Bug > Components: UISaveState > Affects Versions: 1.1.4-SNAPSHOT > Reporter: Cagatay Civici > Assigned To: Cagatay Civici > Fix For: 1.1.4-SNAPSHOT > > > restoreAttachedState of UIComponentBase wraps the lists as an ArrayList so > restoring values fails when a list implementation other than an arraylist is > used. > An example; > private LinkedList list; > private String name; > private String surname; > public LinkedList getList() { > list = new LinkedList(); > list.add(name); > list.add(surname); > return list; > } > public void setList(LinkedList list) { > name = (String)list.get(0); > surname = (String)list.get(1); > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira