-
1. Re: EntityHome problem
pmuir Jun 26, 2007 2:37 PM (in response to knisterpeter)That should be /details.xhtml for the view-id in pages.xhtml probably.
-
2. Re: EntityHome problem
knisterpeter Jun 26, 2007 3:01 PM (in response to knisterpeter)It is. Acutally it is a bit longer line '/admin/secure...'. I've cut that down for simplicity.
-
3. Re: EntityHome problem
dustismo Jun 26, 2007 3:04 PM (in response to knisterpeter)Just a shot in the dark, but are you using myfaces + state saving=server? If so, it is a known problem with myfaces.
-
4. Re: EntityHome problem
knisterpeter Jun 26, 2007 3:07 PM (in response to knisterpeter)No, but thanks. I'm using JSR RI 1.2 with Facelets 1.1.12 and Tomcat 5.5.
-
5. Re: EntityHome problem
knisterpeter Jun 27, 2007 4:30 AM (in response to knisterpeter)I have found the following in the seam DEBUG logs:
[DEBUG] 10:19:34.211 core.Events - Processing event:org.jboss.seam.preRemoveVariable.entityId [DEBUG] 10:19:34.211 seam.Component - instantiating Seam component: org.jboss.seam.core.events [DEBUG] 10:19:34.212 seam.Component - initializing new instance of: org.jboss.seam.core.events [DEBUG] 10:19:34.212 seam.Component - done initializing: org.jboss.seam.core.events [DEBUG] 10:19:34.213 seam.Component - instantiating Seam component: org.jboss.seam.core.events [DEBUG] 10:19:34.213 seam.Component - initializing new instance of: org.jboss.seam.core.events [DEBUG] 10:19:34.214 seam.Component - done initializing: org.jboss.seam.core.events [DEBUG] 10:19:34.214 core.Events - Processing event:org.jboss.seam.postRemoveVariable.entityId
Where can I find the code logging this statements?
I'll just want to find an entry point to debug my problem. Where and when are the page parameters set to the model? -
6. Re: EntityHome problem
knisterpeter Jun 27, 2007 5:18 AM (in response to knisterpeter)After looking throught the code in seam related to setting page parameters, I'm sure my problem is related to this line in pages.xml:
<param name="entityId" value="#{accountHome.id}" converter="java.lang.Integer" />
The converter in JSF is not java.lang.Integer, but javax.faces.Integer!
The problem why I not noticed this is that Seam silently fail in creating the converter (without logging the error) and removing the parameter!!!
It would be best if there is a logentry (maybe only at debug level) if the converter creation fails! :( -
7. Re: EntityHome problem
knisterpeter Jun 27, 2007 5:20 AM (in response to knisterpeter)For reference:
The code in Seam is in org.jboss.seam.pages.Param#getValueFromRequest() around lines 133 to 142 -
8. Re: EntityHome problem
knisterpeter Jun 27, 2007 5:33 AM (in response to knisterpeter)Also I should have used converterId instead of converter attribute.
-
9. Re: EntityHome problem
pmuir Jun 27, 2007 5:42 AM (in response to knisterpeter)Seam allows you to use the java.lang.XXX for converter id (extension to JSF). The reason for no error was not using the correct attribute, if a converter can't be found, then an exception will be thrown.
-
10. Re: EntityHome problem
knisterpeter Jun 27, 2007 7:10 AM (in response to knisterpeter)For sure the attribute was the worst thing, but as you can see here:
public Object getValueFromModel(FacesContext facesContext) { Object value = getValueExpression().getValue(); if (value==null) { return null; } else { Converter converter = null; try { converter = getConverter(); } catch (RuntimeException re) { //YUCK! due to bad JSF/MyFaces error handling return null; } return converter==null ? value : converter.getAsString( facesContext, facesContext.getViewRoot(), value ); } }
Any (runtime) exception thrown by the getConverter() call will be dropped silently which (I think) is bad. -
11. Re: EntityHome problem
pmuir Jun 27, 2007 8:13 AM (in response to knisterpeter)Can you file a JIRA issue for this?