Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Managed Bean Method Called Several Times in AF:ITERATOR

Neliel-Oracle-Newbie-OracleMay 4 2011 — edited May 4 2011
Dear All,
I happen not to understand this concept in ADF. Being a newbie I would like to know
the rationale behind this.

I have use af:foreach components and then I bind it in my managed bean below.
<af:panelTabbed id="pt1">
	<af:forEach var="item" items="#{testBean.departmentsData}">
	  <af:showDetailItem text="#{item}" id="sdi1"/>
	</af:forEach>
</af:panelTabbed>
public class TestBean {
    public List getDepartmentsData() {
        System.out.println("I was clicked!!!!");
        List lstData = new ArrayList();
        lstData.add("IT");
        lstData.add("Finance");
        lstData.add("Accounting");
        return lstData;
    }
}
On first load, it prints 7 times of "I was clicked".

When I clicked any of the tab, I get 7 times again which means my method was called 7 times.
Any reason behind this.? Thanks.

I used JDEV PS3 by the way.
This post has been answered by John Stegeman on May 4 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 1 2011
Added on May 4 2011
4 comments
409 views