I have a dialog with a dataTable
, but clicking the button that should open it does not happen.
It also has a dataTable
inside it that should have values corresponding to the line in which it corresponds to dataTable
.
Could you tell me why this occurs?
<p:commandButton value="Buscar" action="#{ocorrenciaViewMB.obterOcorrencia}" ajax="true" update=":form"></p:commandButton>
<p:dataTable var="ocorrencia" value="#{ocorrenciaViewMB.listaocorrencia}" emptyMessage="Nenhuma ocorrência de risco encontrada." widgetVar="riscoTabela" sortMode="multiple" draggableColumns="true"
draggableRows="true" resizableColumns="true" caseSensitiveSort="false">
<f:facet name="header">
<p:outputPanel>
<h:outputText value="#{msgs.OcorrenciasDeRisco}" />
</p:outputPanel>
</f:facet>
<p:column headerText="#{msgs.Codigo}" colspan="1"
sortBy="#{ocorrencia.codigo}">
<h:outputText value="#{ocorrencia.codigo}" />
</p:column>
<p:column style="width:32px;text-align: center">
<p:commandButton value="Modal" type="button" oncick="PF('modal').show();" />
</p:column>
<p:dialog header="Danos" closeOnEscape="true" showEffect="fade" position="center" hideEffect="explode" widgetVar="modal" id="modal" modal="true" height="50">
<p:dataTable var="dano" id="dataTableDano" value="#{ocorrencia.listaDeDanos}" emptyMessage="Nenhum encontrado." sortMode="multiple" draggableColumns="true" draggableRows="true" resizableColumns="true" caseSensitiveSort="false">
<h:outputText value="Código" />
<h:outputText value="#{dano.codigo}" />
<h:outputText value="Descrição" />
<h:outputText value="#{dano.descricao}" />
</p:dataTable>
</p:dialog>
</p:dataTable>