jsf 2 - JSF&primefaces after dialog closed background buttons don't work -
i have button open dialog:
<p:commandbutton id="addbutton" value="Новая контрольная точка" oncomplete="dlg_add.show();" rendered="#{controlpointbean.selectedsubject != null}"/>
and dialog wizard in it:
<p:dialog widgetvar="dlg_add"> <p:wizard id="wizard" widgetvar="wizard"> <p:tab title="Тип контрольной точки"> <p:datatable id="cptypes" var="cptype" value="#{controlpointbean.cptypeslist}" rows="10" rowkey="#{cptype.id}" selection="#{controlpointbean.selectedcptype}" selectionmode="single" filteredvalue="#{controlpointbean.filteredcptypeslist}"> <p:column headertext="Тип контрольной точки" filterby="type" filtermatchmode="contains"> #{cptype.type} </p:column> </p:datatable> </p:tab> <p:tab title="Общее"> <h:panelgrid id="data" columns="2"> <h:outputtext value="Название: " /> <p:inputtext value="#{controlpointbean.name}"/> <h:outputtext value="Модуль: " /> <p:inputtext value="#{controlpointbean.module}"/> <h:outputtext value="Минимальный балл: " /> <p:inputtext value="#{controlpointbean.mingrade}"/> <h:outputtext value="Максимальный балл: " /> <p:inputtext value="#{controlpointbean.maxgrade}"/> </h:panelgrid> </p:tab> <p:tab title="Завершить"> <p:panel header="Проверьте введённые данные"> <h:panelgrid id="confirmation" columns="2"> <h:outputtext value="Предмет:"/> <h:outputtext styleclass="outputlabel" value="#{controlpointbean.selectedsubject.name}"/> <h:outputtext value="Тип:"/> <h:outputtext styleclass="outputlabel" value="#{controlpointbean.selectedcptype.type}"/> <h:outputtext value="Название: " /> <h:outputtext styleclass="outputlabel" value="#{controlpointbean.name}"/> <h:outputtext value="Модуль: " /> <h:outputtext styleclass="outputlabel" value="#{controlpointbean.module}"/> <h:outputtext value="Минимальный балл: " /> <h:outputtext styleclass="outputlabel" value="#{controlpointbean.mingrade}"/> <h:outputtext value="Максимальный балл: " /> <h:outputtext styleclass="outputlabel" value="#{controlpointbean.maxgrade}"/> </h:panelgrid> </p:panel> <p:commandbutton value="Принять" update=":form:messages, :form:datatable" actionlistener="#{controlpointbean.save}" oncomplete="dlg_add.hide();wizard.reset();"/> </p:tab> </p:wizard>
when wizard completed , click "Принять" button, dialog closes, updates everything, buttons on background of dialog don't until page reloaded. in primefaces debug console looks not clicked. here method save() backing bean:
public void save() throws systemexception{ try{ facescontext facescontext = facescontext.getcurrentinstance(); portletrequest portletrequest = (portletrequest) facescontext.getexternalcontext().getrequest(); controlpointlocalserviceutil.addcontrolpoint(name, selectedsubject.getid(), selectedcptype.getid(), module, mingrade, maxgrade, 0, portalutil.getuserid(portletrequest)); } catch(rowalreadyexistsexception e){ facescontext.getcurrentinstance().addmessage(null, new facesmessage(facesmessage.severity_warn, "Ошибка", e.getlocalizedmessage())); } finally{ selectedcptype=null;name=null;module=0;mingrade=0;maxgrade=0; cplist= controlpointlocalserviceutil.findall(); filtercpbyselectedsubject(); } }
Comments
Post a Comment