[jboss-user] [JBoss Seam] - getter problem

skanky78 do-not-reply at jboss.com
Fri Oct 19 17:34:05 EDT 2007


hi,

my problem is a well known problem but nonetheless i'm wondering how to do it right..maybe one of you can help me with this issue:

i have a datatable which uses an extended datamodel (similar to this example http://wiki.apache.org/myfaces/WorkingWithLargeTables) to cope with large amount of data. the problem is that @datamodel doesn't work  with that kind of object so i need another way how to avoid that my buisness logic (database calls) in the getter are executed several times per request.

class:
@Scope(ScopeType.SESSION)
  | @Name("component")
  | public class Component {
  | 
  |   public getDataModel() {
  |     // calls to database etc.
  |   }
  | 
  | }

xhtml:
anonymous wrote : 
  | <rich:datatable id="dataTable" value="#{component.dataModel}" var="product" >
  | 
  | ...
  | 
  | </h:datatable>


the data of the table should be refreshed with every request, for example if the user hits the refresh button of the browser. how can i remove my buisness logic from the getter? is there a way to use @factory (and @datamodel)?

thanks in advance,
sven

ps: i'm not using hibernate...




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

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



More information about the jboss-user mailing list