[jboss-user] [JBoss Seam] - Re: @DataModel s:link h:commandButton h:dataTable

damianharvey do-not-reply at jboss.com
Thu Dec 13 05:33:03 EST 2007


The people on this forum really are very friendly and extremely helpful. It just needs a reciprocal amount of effort - which starting a Wiki page would be a good example of. Maybe start with something like "Understanding Seam DataModels" and use this thread as a basis?

Regarding your question though; From the manual: anonymous wrote : 27.10.1. Annotations for use with dataTable
  | 
  | @DataModel
  | Outjects a property of type List, Map, Set or Object[] as a JSF DataModel into the scope of the owning component (or the EVENT scope if the owning component is STATELESS).
In your Bean you declare your DataModel as @DataModel
  | private List<Thing> things;
This outjects a DataModel context variable called 'things' into the same scope (eg. Event, Session) as your Bean. 

But in your datatable you refer to <h:dataTable value="#{accountService.things}" var="thing"> which is just a list and not a DataModel. Try changing it to <h:dataTable value="#{things}" var="thing">
Hope this helps.

Cheers,

Damian.


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4112505#4112505

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4112505



More information about the jboss-user mailing list