I'm using EJB and JSF. I made a jsp simple page with a button "get list". When it's clicked, a managed bean method is called that sets the list, which is then displayed in the jsp with the dataTable tag.
The question is, how can I pre load this list/dataTable on page load without having to click the button?
This is the method that's called through the button action on the jsp:
public String retrieveList() {
items = facade.getAllItem();
return "";
}
this is the part of the jsp:
<h:dataTable value="#{mybean.items}" var="sup"
binding="#{mybean.dataTable}"
rowClasses="oddRow, evenRow"
styleClass="tableStyle"
headerClass="tableHeader"
columnClasses="column1, column2, column1, column1, column1, column1">