-
1. Re: contactlist example not working on jboss with JSF 1.2 RI
gavin.king Oct 18, 2006 2:48 PM (in response to cja987)AFAIK it runs perfectly on the RI. Are you sure you have myFacesLifecycleBug=false?
-
2. Re: contactlist example not working on jboss with JSF 1.2 RI
gavin.king Oct 18, 2006 3:08 PM (in response to cja987)Ups, looks like I'm wrong .... oh and I bet I know why.
There is a bug in the RI, that I already reported to Roger (and he is fixing it), that means Seam page actions and page parameters probably don't work reliably.
I'll investigate a little bit more just to confirm that this is the real problem, but I'm almost certain it is. -
3. Re: contactlist example not working on jboss with JSF 1.2 RI
gavin.king Oct 18, 2006 3:11 PM (in response to cja987)Yep, that is the problem. Try using view-ids like "/search.seam" instead of "/search.xhtml" in your pages.xml file. This should fix it.
Note that this *is* a bug in the RI. -
4. Re: contactlist example not working on jboss with JSF 1.2 RI
cja987 Oct 18, 2006 3:19 PM (in response to cja987)Positive. In fact I forgot to set it back to true when I tried it with myFaces, and it still worked.
If the contactlist example works out of the box with the 1.2RI, then perhaps I'm configuring it wrong in jboss. Here's what I did to run it:- cvs checkout and build seam
- delete myfaces* from /c/jboss/server/default/deploy/jbossweb-tomcat55.sar/jsf-libs
- copy jsf-api.jar and jsf-impl.jar from the RI to jsf-libs
- copy el-api and el-ri.jar from seam/facelets/lib to jsf-libs
- edit seam/build.properties to change the tomcat/jboss paths and change jbossHasMyFacesLifecycleBug to false
- cd to examples/contactlist
- edit resources/WEB-INF/web.xml to use the RI ConfigureListener instead of the myfaces one
- edit resources/components.properties and verify that myFacesLifecycleBug is indeed false
- edit build.xml to keep it from copying el-api and el-ri into the build's WEB-INF/lib (otherwise I get some nasty tracebacks about loader constraint violations)
- ant deploy
- navigate to http://localhost:8080/seam-contactlist/
- click one of the contacts
- see nothing but blank fields
Could the problem be related to having the EL stuff in jsf-libs and not the application? I've never made it work the other way around -- I can paste that traceback if you want.
- cvs checkout and build seam
-
5. Re: contactlist example not working on jboss with JSF 1.2 RI
cja987 Oct 18, 2006 3:22 PM (in response to cja987)Heh, all that typing and I could have waited a few more minutes instead. I'll try using the .seam view ids and see how that works.
-
6. Re: contactlist example not working on jboss with JSF 1.2 RI
cja987 Oct 18, 2006 3:41 PM (in response to cja987)Okay, I switched all the .xhtml extensions in pages.xml to .seam, and now viewContact works, but editContact continues to give me a blank contact. Delete Contact is also nonfunctional, and results in this on the console:
WARNING: phase(RENDER_RESPONSE 6,com.sun.faces.context.FacesContextImpl@5f8ddb) threw exception: javax.faces.el.EvaluationException: org.hibernate.TransientObjectException: the detached instance passed to delete() had a null identifier org.hibernate.TransientObjectException: the detached instance passed to delete() had a null identifier com.sun.faces.application.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:97) org.jboss.seam.actionparam.ActionParamBindingHelper.invokeTheExpression(ActionParamBindingHelper.java:58) org.jboss.seam.actionparam.ActionParamMethodBinding.invoke(ActionParamMethodBinding.java:71) org.jboss.seam.core.Expressions$2.invoke(Expressions.java:93) org.jboss.seam.core.Pages.callAction(Pages.java:309) org.jboss.seam.jsf.AbstractSeamPhaseListener.callPageActions(AbstractSeamPhaseListener.java:171) org.jboss.seam.jsf.AbstractSeamPhaseListener.beforeRender(AbstractSeamPhaseListener.java:143) org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:52) com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:218) com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144) javax.faces.webapp.FacesServlet.service(FacesServlet.java:245) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) ...etc...
Just for the hell of it I changed all the view-id's in faces-config.xml to use .seam extensions too. No effect. -
7. Re: contactlist example not working on jboss with JSF 1.2 RI
cja987 Oct 18, 2006 4:39 PM (in response to cja987)PEBKAC again, I forgot to update the views themselves.
Still, the problems aren't over: when I edit a contact and click update, it switches immediately to the create screen and offers me "Create Contact" instead (which does actually work). Deleting a contact blanks all the fields, but doesn't delete the contact.
Back to myfaces once again. -
8. Re: contactlist example not working on jboss with JSF 1.2 RI
gavin.king Oct 19, 2006 11:40 AM (in response to cja987)Leave faces-config as it is. You probably need *both* .seam and .xhtml in pages.xml, I guess.
-
9. Re: contactlist example not working on jboss with JSF 1.2 RI
gavin.king Oct 19, 2006 6:49 PM (in response to cja987)OK. So, I got the contactlist example running on JSF 1.2. There were 2 bugs in the JSF RI:
(1) the problem I have reported to Roger. I have committed a fix to Seam, to work around this bug.
(2) a problem where there is a wierdo EL bug when using the deprecated JSF 1.1 style VariableResolver (which Seam uses). I tried creating a JSF 1.2 ELResolver and got it working with that. -
10. Re: contactlist example not working on jboss with JSF 1.2 RI
gavin.king Oct 19, 2006 6:52 PM (in response to cja987)So, if you want to make Seam work in JSF 1.2, for now you need to add the following to faces-confg.xml:
<application> <el-resolver>org.jboss.seam.jsf.SeamELResolver</el-resolver> </application>
I'll see if i can find a better solution. -
11. Re: contactlist example not working on jboss with JSF 1.2 RI
gavin.king Oct 19, 2006 7:36 PM (in response to cja987)OK. Better solution found. MyFaces seems to tolerate the JSF 1.2 faces-config.xml, so I put it in the default Seam faces-config.
Now working ootb on 1.2.