[jboss-user] [JBoss Seam] - Re: Needing help for the lazy initialize

Seto do-not-reply at jboss.com
Sat Feb 17 11:02:26 EST 2007


for example 

  | <ul>
  | <ui:repeat value="#{catgories}" var="catgory">
  |   <li>#{category.name}</li>
  |   <ul>
  |   <ui:repeat value="#{catgory.positions}" var="position">
  |     <li>#{position.name}</li>
  |     <ul>
  |     <ui:repeat value="#{position.articles}" var="article">
  |       <li>#{article}</li>
  |     </ui:repeat>
  |     </ul>
  |   </ui:repeat>
  |   </ul>
  | <ui:repeat>
  | </ul>
  | 

Refering to the blog example, I used the #{position.recentArticles} instead. 

  | public List getRecentArticles(){
  |   return articles.sublist(0, 10);//just a example so ignore the length problem
  | }
  | 
But it also initilized the other articles. And it cause the performance leak. And I want to limit the initialization of the articles. I want it just initilize the recent 10 articles. How can I do that?

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

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



More information about the jboss-user mailing list