在 JSF 2 中,我需要在显示对话框之前准备好数据。在下面的代码中,在 viewscoped 托管 bean 中定义了方法“newAuto”。单击按钮后,我想先调用此方法,然后显示对话框。
我尝试了很多方法,都失败了。
谢谢
<h:commandButton type="button" value="Add Dialog" onclick="jsf.ajax.request(this, event, {execute: 'newAuto'}); autoDialog2.show(); return false;" />