You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "sean schofield (JIRA)" <de...@myfaces.apache.org> on 2006/10/16 03:06:36 UTC

[jira] Reopened: (TOMAHAWK-738) SaveState fails with a java.util.List implementation other than ArrayList

     [ http://issues.apache.org/jira/browse/TOMAHAWK-738?page=all ]

sean schofield reopened TOMAHAWK-738:
-------------------------------------

             
Catagay this breaks my code.  Serializable should also be supported.  I have a bunch of Hibernate domain objects that are serializable that I use in a multi page table where I need save state.  

> 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.5-SNAPSHOT
>            Reporter: Cagatay Civici
>         Assigned To: Cagatay Civici
>             Fix For: 1.1.5-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