I have a datatable and been using rich a4j:commandlink for particular column.
<a4j:repeat value="#{EquityAccountMenu.accountList}" id="accountList" var="accounts" rowKeyVar="rowKey"> <a4j:form ajaxSubmit="true" id="accSelForm" > <a4j:commandLink value="#{rowKey}" action="#{EquityActionHandler.onAccountSelection}" /> </a4j:form> </a4j:repeat>
now every time I click command link, Constructor for EquityAccountMenu gets called and accountList gets fetched from the database, even if the a4j:repeat is not reRendered by the command link.
EquityAccountMenu is request scope bean
How can I avoid unnecessary calling of accountList?
Thanks in advance