Can you guys help me to explain the reason why the method is called multiple times when I used the h:dataTable in facelet page.
<h:dataTable id="listTable" styleClass="pageView_listForm"
value="#{ClassName.dataFactory(topic)}" border="2" rules="rows"
var="item" width="100%" cellpadding="1" cellspacing="0" rowClasses="panelRowOdd,panelRowEven" >
//Body
</h:dataTable>
Bean class
@ManagedBean (name="ClassName")
@SessionScoped
public class ClassName{
...
public DataModel <Person> dataFactory(String topic){
DataModel items = null;
..........
// This block code gets the list of Person
..........
return items;
}
}
I was launching the page when it called the method dataFactory multiple times. I did not know exactly what happen here? Is it a bug from JSF or my implementation.Can you guy help me?
Thank you.