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;
檢查導入。它應該是javax.faces.bean.ViewScoped(並且註解@ViewScoped不是ViewScope) –
我已經更新了這篇文章,已經使用了來自faces.bean的@ViewScoped – user3726033