In the JSF 2, I need to get ready the data before showing a dialog. In the code below, the method 'newAuto' defined in the viewscoped managed bean. once button is clicked, I want to call this method first, then show dialog.
I tried lots of ways, all failed.
thanks
<h:commandButton type="button" value="Add Dialog" onclick="jsf.ajax.request(this, event, {execute: 'newAuto'}); autoDialog2.show(); return false;" />