I have an entity Person that has a ManyToMany relation to other Persons 
("friends" ;)). When editing one person there's a SelectManyMenu showing all 
Persons and you can select or deselect friends.

The SelectManyMenu has a Converter (... converter="#{personConverter}"), of 
course. This one is implemented as a Stateless Session Bean with 
@Name("personConverter") and the two methods getAsString(...) and 
getAsObject(...).

The persons are filled into that List by <f:selectItems 
value="#{personListe.selectItems}" />. You guess it, the selectItems() method 
returns a List, which's items are all added like this: ...add(new 
SelectItem(aPerson.getId(), aPerson.getName()));

So far so good. Should be nothing special here ;).

When going to the edit page everything works fine, and the Log shows me that 
the getAsString-method is called for every Person in the list.

BUT: As soon as a safe the edited person (and it doesn't play a role whether I 
select friends or not) there's an Exception:
FATAL [org.apache.myfaces.renderkit.html.HtmlRepsonseStateManager] Cannot 
decode Object from Base64 String
  | java.lang.ClassNotFoundException: No ClassLoaders found for: 
de.beffo.test.converter.PersonConverter
  |     at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:212)
  |     at ...

Well... how can it be that the Converter is found when the page is displayed, 
and not found right after submitting? Anyone having experience with such a 
behaviour?


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3960961#3960961

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3960961
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to