現在、Web アプリケーションを Primefaces 3.5 から 4.0 に更新しています。onclick のリンクを介してインプレース編集を切り替えるために使用した複合コンポーネントがありますp:widgetVar('dlg').show()
。これを Primefaces 4.0 の方法に更新しましたPF('dlg').show();
が、機能しません。
コードは次のようなものです。
<p:inplace id="inplaceEdit" widgetVar="ie_#{cc.attrs.pojo.id}"
editor="true"
styleClass="description" emptyLabel="Enter A Description" >
<p:inputText value="#{cc.attrs.pojo.description}"
required="true" maxlength="140"
label="description" styleClass="description">
<p:ajax process="@this" listener="#{cc.attrs.bean.update(cc.attrs.pojo)}"/>
</p:inputText>
</p:inplace>
<h:panelGroup>
<div class="aap-btn-group">
<p:commandLink id="pieButton" onclick="PF('ie_#{cc.attrs.pojo.id}').show()">
<i class="icon icon-edit"></i>
</p:commandLink>
</div>
</h:panelGroup>
これは私のページにリンクを出力しますPF('ie_19').show()
が、ブラウザコンソールから関数を呼び出してもインプレース編集を切り替えません。