[jboss-user] [JBoss Seam] - Re: how is DataModelSelection populated

bfo81 do-not-reply at jboss.com
Wed Jul 12 08:54:18 EDT 2006

Hmm... I have the following code in my mind:

  | @DataModel
  | private List<WhatEver> whatEverList;
  | @PersistenceContext
  | private EntityManager em;
  | ...
  | @factory("whatEverList")
  | public void populateList() {
  |     whatEverList = em.createQuery("from WhatEver").getResultList();
  | }
  | ...
So how to come from that java.util.List to a ListDataModel?

I agree with you. A growing FAQ list with the possibility of user contribution would be great. Searching the forum often is a mess since the important information is hidden between tons of posts or in threads with misleading titles. In addition to that the search function often delivers you threads that don't contain any helpful information.

Furthermore I suggest a list of "common mistakes". I mean, you often get exceptions and don't know where they come from. Or something just doesn't work the way you want to. And if you find a solution after some cups of coffee why not to record it somewhere? Another one will be grateful not to run that gauntlet again. Your entity in an editor page is null and you get a model update failure? No worries, mate, just add the forgotten @Name annotation to your entity bean and it will work (that's what I ran into today *g*).

Moreover, what about a repository of useful code pieces, templates and patterns contributed by Seam users? Never reinvent the wheel ;). Be it CRUDs or template method patterns for not repeating yourself over and over (like posted yesterday), all this can speed up your development. You're already at home with your loved ones while the Spring coders still sit in the office ;).

I don't demand perfect software for this. The Seam team has enough more important things to do. Little hacks, maybe a speziell moderated subforum, could be sufficient and very very helpful.

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

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

More information about the jboss-user mailing list