Hi Everyone,
I have written an Entity Query in components.xml file as shown below:
<framework:entity-query name="rolesLists" ejbql="select r from UserRole r" />
and then I am populating an <s:selectItems> list with this rolesList as shown here :
<h:selectOneMenu value="#{userAction.userRole}" required="true" > <s:selectItems value="#{roleLists.resultList}" var="role" label="#{role.strTitle}" noSelectionLabel="#{messages.defaultListItem}" /> <s:convertEntity /> </h:selectOneMenu>
Now my problem is that when the page is load, then the userAction.getUserRole() method is called as many times as the items in the select list, i.e; the size of rolesLists.
getUserRole() method returns an Entity of type UserRole.
What should I do so that the getUserRole() method is called once.?
Any help would be appreciated.
Thanks & Regards
Ambrish
You cannot do anything about this. This is how JSF works. There are work being done in JSF 2 to prevent the need of all phases to be asked when you use rendered.