These classes can't derive from DataModel. In the real project they're Entities
and have their own class hierarchy. Any solution needs to be a separate concern from the
entity object model.
Based on some examples I saw in my seam-gen code I'm trying something a little
different. I'm passing the entity id as a <f:param> in the <s:link>
element. This is working on the outermost table but now my inner objects aren't
rendering.
Here's my code:
| <ice:dataTable id="departmentListResults" width="100%"
cellspacing="1"
| value="#{departmentList.resultList}"
| var="dept">
| <ice:column>
| <ice:dataTable id="projectListResults" width="100%"
cellspacing="1"
| value="#{dept.projects}"
var="proj">
| <ice:column>
| <!-- This is where my s:link and f:param would
normally go...if the rendering was working. -->
| <ice:outputText value="Nothing here" rendered="#{proj ==
null}"/>
| <ice:outputText value="#{proj.projectId}"
rendered="#{proj != null}"/>
| </ice:column>
| </ice:dataTable>
| </ice:column>
| <ice:dataTable>
|
departmentList is the seam-gen EntityQuery object that pulls back a list of Department
objects (@Entity). Within each Department is a Set (1-m relationship between Department
and Project).
I get a javax.faces.el.PropertyNotFoundException on proj.projectId. I can output just
"#{proj}" and get something like this: com.foobar.spurs.model.Project@1bf446e,
so I know there's a non-null Object there and its type is Project.
So why am I getting an exception when I try to access any of Project's properties?
(There are full JavaBean getters/setters for each property I'm trying to access thanks
to seam-gen.)
The strange thing is this rendering was working fine when my objects were trivial
(non-Entity) classes, and I could easily access properties from the "inner" list
(proj in this example).
Many thanks in advance for any ideas!
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4019170#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...