2014-01-29 17 views
0

我有.jspx頁面,其中包括.jsff。在.jsff我:af:selectOneChoice不斷重新獲取數據

<af:selectOneChoice id="soc" autoSubmit="true" required="false" 
               label="Select" contentStyle="width:200px" 
               binding="#{SOME_BEAN.soc}" 
               labelStyle="width:6em;" 
               unselectedLabel="" 
               valueChangeListener="#{SOME_BEAN.handleSocChanged}" 
               inlineStyle="margin-left:100px;"> 
     <af:forEach var="var" items="#{SOME_BEAN.someListOfDTO}"> 
       <af:selectItem id="si" value="#{var.field1}" label="#{var.field1}-#{var.field2}"/> 
     </af:forEach>       

</af:selectOneChoice> 

項目中的foreach是actualy表達方法getSomeListOfDTO返回DTO對象列表。所以在SOME_BEAN中沒有這樣的字段someListOfDTO

那好嗎?

因爲我面臨這樣的麻煩,我的程序不斷地調用getSomeListOfDTO

回答