[jboss-user] [JBoss Seam] - Re: DataModel entries appearing twice
enrico256
do-not-reply at jboss.com
Tue Aug 14 04:40:20 EDT 2007
Problem solved: trying to be smart the Item.setFolder method was implemented as following:
public void setFolder(Folder folder) {
| this.folder = folder;
| folder.getItems().add(this);
| }
In reality item.setFolder and folder.getItems().add are called as necessary by the framework when loading objects from the db. The above implementation o f setFolder adds every item a second time resulting in a list containg every item twice. Removing the
folder.getItems().add(this);
line solved the problem :-)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4073871#4073871
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4073871
More information about the jboss-user
mailing list