2012-05-01 39 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