0

JSF2とrichfacesの使用4。

フォームに複数のリージョンを持つ2つのリージョンがあります。別のリージョンのrenderを呼び出したい。どうすればいいですか?

<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>
4

1 に答える 1

0

h:commandLinkにはrender属性がありf:ajaxません。

ページを更新せずにrg_2内からrg_1を再レンダリングする場合(ajax)

以下をせよ

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

mybean.resetBeanまた、メソッドがvoidメソッドまたはリターンであることを確認してくださいnull

于 2012-05-01T10:05:19.967 に答える