Help

Controls

PermLinkWikiLink

Built with Seam

You can find the full source code for this website in the Seam package in the directory /examples/wiki. It is licensed under the LGPL.

Forum: Seam Users Forum ListTopic List
22. Jul 2008, 15:16 CET | Link

Let's take a look at this simple fragment of page :


<h:dataTable  value="#{projectList.resultList}" var="project" rendered=" #{projectList.resultCount > 0}">
    <h:column>
	<h:outputText value="#{project.manager}"/>
    </h:column>
</h:dataTable>

The projectList variable is an EntityQuery object. Using some classes from this post (great tool to measure performance of your application by the way !), i found that some methods get called more than once for apparently no reason :



31.55389 ms7   EntityQuery.getResultCount()

8.847945 ms1   EntityQuery.getResultList()

5.13022 ms1   EntityQuery.validate()

Maybe someone here has already experienced similar behavior with EntityQuery or EntityHome objects ? When you have a large view with many components using the rendered attribute and the same method gets called 100 times or more, it may be a problem...

Thanks,

Charles

 

There are just two kinds of languages: the ones everybody complains about and the ones nobody uses.

- Bjarne Stroustrup