I'm getting the following error on a few pages (using Seam 2.0.0.CR1):
| java.lang.IllegalArgumentException: Cannot convert [EMAIL PROTECTED] of
type class com.locuslive.odyssey.entity.Groups to class
com.locuslive.odyssey.entity.Groups_$$_javassist_219
|
My page fragment looks like this:
| <fieldset class="inputFieldset">
| <legend>#{messages['users.groups']}</legend>
| <div style="">
| <h:selectManyCheckbox layout="pageDirection" id="userGroups"
value="#{adminMaintainUser.groups}">
| <s:selectItems value="#{adminMaintainUser.allGroups}"
var="groups" label="${groups.groupName}" />
| <s:convertEntity/>
| </h:selectManyCheckbox>
| </div>
| </fieldset>
|
My adminMaintainUser Bean includes the following methods:
| public List<Groups> getAllGroups() {
| //Get all possible groups for this company
| return entityManager.createQuery("select g from Groups AS g where
g.companyByCompanyId = :company")
| .setParameter("company", userProfile.getUser().getCompany())
| .getResultList();
|
| }
| public List<Groups> getGroups() {
| //Populate the groups from the user entity before passing back to the
page.
| return entityManager.createQuery("select ugl.groups from UserGroupList
AS ugl WHERE ugl.user = :user")
| .setParameter("user", userHome.getInstance())
| .getResultList();
| }
|
UserGroupList is an entity that contains both a User and a Group (ie.
many-to-many join table).
I've seen references to similar problems as this in the forum but they had
issues that were fixed in Seam 1.2.1.GA.
Can anyone point me in the right direction? Weirdly enough this used to work
and I can't for the life of me see what has changed.
Much appreciated.
Thanks,
Damian.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4093009#4093009
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4093009
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user