[jboss-user] [JBoss Seam] - Re: SeamSelectItems - 1.1.1beta4
Frippe
do-not-reply at jboss.com
Tue Feb 6 04:24:03 EST 2007
May I add aquestion in this discussion?
I am trying to get S.S.I. to work with a stateless backingbean.
The code below renders just fine, and my current value is set correctly as well. My problem arise when I submit the form with the selectOneMenu.
I get the follwing exception:
09:31:46,386 ERROR [PhaseListenerManager] Exception in PhaseListener RESTORE_VIEW(1) afterPhase
| .
| .
| .
| 09:31:46,402 ERROR [SeamExceptionFilter] uncaught exception handled by Seam
| javax.servlet.ServletException: Could not restore StateHolder of type com.omxgroup.lap.acl.actions.ACLListActionImpl$1 (missing no-args constructor?)
I've set up the following:
Except of my backing bean
| @Stateless
| @Name("aclList")
| public class ACLListActionImpl implements ACLListAction {
|
| @SelectItems(labelMethod="getName", valueStrategy=SelectItems.Strategy.INDEX)
| private List rights;
|
| @Factory("rights")
| public List getRights() {
|
| if(rights == null){
| rights = em.createQuery("from ARO").getResultList();
|
| selAro = (ARO)rights.get(0);
| }
| return rights;
| }
|
| @Factory("converter")
| public Converter getConverter() {
| return new SelectItemsConverter() { ...
|
Excerpt of my XHTML page
<h:selectOneMenu id="selAro" value="#{selAcl.aro.name}" converter="#{converter}">
| <si:selectItems value="#{aclList.rights}" var="right" label="#{right.name}"/>
| </h:selectOneMenu>
|
Hopefully I've got most of this right :-)
As it is now, I can't save the changes I do in the form because of the exception.
Have you guys some hints how I can correct this?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4011790#4011790
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4011790
More information about the jboss-user
mailing list