2016-08-15 82 views
0

我有一個使用A4J web應用:的commandButton這樣的:JSF 2.1 A4J:的commandButton不呈現結果表@ViewScope

<h:form> 
<a4j:region id="search_form"> 
<a4j:commandButton render="ListOfPerson" action="personBean.search" value="search" execute="@form" status="ajaxStatus"/> 
</a4j:region> 
<a4j:outputPanel id="ListOfPerson" ajaxRendered="true"> 
    <rich:datatable>...</rich:datatable> 
</a4j:outputPanel> 
</form> 

與@ManagedBean(麪包),並@ViewScope IST註釋的豆。當我將範圍更改爲@SessionScope時,一切都按預期工作。有任何想法嗎?

我用以下的進口:

import javax.faces.bean.ManagedBean; 
import javax.faces.bean.ViewScoped; 
+0

檢查導入。它應該是javax.faces.bean.ViewScoped(並且註解@ViewScoped不是ViewScope) –

+0

我已經更新了這篇文章,已經使用了來自faces.bean的@ViewScoped – user3726033

回答

0

解決了,我刪除了A4J:周圍的區域A4J:命令按鈕和它的作品。