一、yes 按钮和no按钮焦点设置,添加如下代码,要添加焦点的按钮移到上面,添加style,update也要更新下。
<p:focus id="focus" context="no"/>
<p:ajax event="click" listener="#{frm1K02ReadSalsGRPBean.deleteCheck}" update="loginName fixationModal fixationModal1 focus"></p:ajax><p:confirmDialog widgetVar="confirmation1K0201" styleClass="preformatted" header="headerName" message="messageName" appendTo="@(body)" severity="info">
<h:commandButton value="no" id="no"type="button" οnclick="PF('confirmation').hide();" style="float:right;" />
<h:commandButton id="serverProcess1" value="yes" >
<p:ajax event="click" process="@form" listener="#{ReadSalsGRPBean.delete}" update="loginName fixationModal fixationModal1 msg00 size fix delete" />
</h:commandButton>
</p:confirmDialog>
二、p和fajax的区别。update = render
<p:ajax event="click" listener="#{ChainBean.selectOHojnGRPFirst}" oncomplete="openDialog()" update=""></p:ajax>
<f:ajax event="click" execute="textLoginer textSaveName" listener="#{ChainBean.deleteCheck}" render="pickList update delete textLoginer textSaveName focus3"/>