PrimeFaces 6.0を使用していますが、ネストされたダイアログを使用して問題が見つかりました。 RequestContext.openDialogが正しく動作していません。例外は発生しませんが、ダイアログは開きません。PrimeFaces openDialogがネストされたダイアログ内で正しく機能しない
私は5ページ(P1からP5)を同じ全面レイアウトに基づいて作成しました。各ページには、p:dataTableが含まれています。 p:dataTableは、p:p:commandButtonのp:列の新しいダイアログで次のページを開きます。これは私が見つけたものです:それらのページのいくつかでは、最初の行のボタンは機能しません。残りの行のボタンは正常に動作します。
問題は行データに固有のようではありません。最初の行のボタンに障害が発生すると、そこに表示されている行に関係なく失敗します。行はさまざまな方法で並べ替えることができます(したがって、最初の行は変化します)。最初の行のボタンは失敗し続け、残りのボタンは引き続き動作します。問題はページにも固有のようではありません。ページがルート(最初のダイアログを開くもの)のときは、すべてのボタンが正しく機能します。この問題は、ダイアログ内でのみ発生します。
これはボタンである:
<p:commandButton
icon="fa fa-folder-open"
action="#{ambientePrueba11.openDialog(currentRow)}"
partialSubmit="true"
process="@this"
update="@none">
<p:ajax
event="dialogReturn"
listener="#{ambientePrueba11.onDialogReturn}"
update="dataTable"/>
</p:commandButton>
これはバッキングBean(5つの豆のそれぞれが異なる結果を有するが、コードの残りの部分は同じである)のコードである:
public String openDialog(AmbientePrueba row) {
EventLogger.log(this, "openDialog", getDenominacion(row));
Object identificacion = getIdentificacion(row);
String key = "PaquetePrueba11";
String outcome = FacesUtils.getPageKeyFacesOutcome(key);
Map<String, Object> options = new HashMap<>();
options.put("modal", true);
options.put("resizable", true);
options.put("draggable", true);
options.put("width", 1260);
options.put("height", 860);
options.put("contentWidth", "100%");
options.put("contentHeight", "100%");
options.put("closable", true);
options.put("includeViewParams", true);
options.put("minimizable", true);
options.put("maximizable", true);
Map<String, List<String>> params = new HashMap<>();
params.put(CPP.ID_RECURSO, toList(identificacion));
params.put(CPP.ID_RECURSO_MAESTRO, toList(identificacion));
params.put(Global.PARAMETRO_FRAMEWORK_SESION, toList(getSessionFrame()));
params.put(Global.PARAMETRO_CONDICION_SESION, toList(MODAL));
RequestContext.getCurrentInstance().openDialog(outcome, options, params);
return null;
}
private List<String> toList(Object value) {
List<String> paramValue = new ArrayList<>();
paramValue.add(value + "");
return paramValue;
}
public void onDialogReturn(SelectEvent event) {
Object response = event.getObject();
facesLogger.info(response + "");
}
誰かに同様の問題が見つかりましたか?この問題を解決するための助けや解決策は非常に高く評価されます。
任意のJavaScriptエラー:
今すぐページP1のボタンが(そのIDが示すように)このように見えますか? –