2012-05-01 75 views
0

使用JSF2和richfaces 4.jsf richfaces a4j:區域調用渲染

我有兩個地區在我的形式與多個地區。我想爲另一個區域調用渲染。我該怎麼做?

<h:form> 
    <a4j:region id="rg_1"> 
     <h:inputText id="field1" value="#{bean.field1}"/> 
    </a4j:region> 
    <a4j:region id="rg_2"> 
     <a4j:commandLink action="#{mybean.resetBean} render="region1" /> 
    </a4j:region> 
</h:form> 

回答

0

H:commandLink沒有render屬性,f:ajax呢......

如果你想重新從rg_2內作出皁苷Rg1無刷新頁面(AJAX)

做以下

<a4j:region id="rg_2"> 
    <a4j:commandLink action="#{mybean.resetBean}" render="rg_1"/> 
</a4j:region> 

還確保mybean.resetBean方法是void方法或返回null

+0

更新了我的答案.. – Daniel

+0

我試過這個,但是commandlink繞過了所有的驗證和行動。 –

+0

嘗試渲染屬性 - 更新我的回答 – Daniel