Java Primefaces中的更新参数
我的问题有点棘手,我希望你能得到我的解释,我会尽我所能弄清楚这一点 我有一个DataTable,其中显示一个按钮,用于查看与所选项目相关的活动。这将打开一个带有菜单的小面板,目前只有一个选项。这将打开另一个包含2个表单的面板,在其中,我可以做我需要做的事情 当我使用更新参数将所需信息添加到数据库中时,我的问题就出现了 这是我正在使用的按钮的代码Java Primefaces中的更新参数,primefaces,Primefaces,我的问题有点棘手,我希望你能得到我的解释,我会尽我所能弄清楚这一点 我有一个DataTable,其中显示一个按钮,用于查看与所选项目相关的活动。这将打开一个带有菜单的小面板,目前只有一个选项。这将打开另一个包含2个表单的面板,在其中,我可以做我需要做的事情 当我使用更新参数将所需信息添加到数据库中时,我的问题就出现了 这是我正在使用的按钮的代码 <p:commandLink action="#{reporteConsultorBean.verActividades(lead)}" upda
<p:commandLink action="#{reporteConsultorBean.verActividades(lead)}" update=":formMain:panelViewNotas" title="Ver actividades asociadas al Expediente">
<center>
<p:graphicImage value="/images/actividad32.png" />
</center>
</p:commandLink>
数据毫无问题地存储在数据库中,但整个视图变得混乱“DialogNotView”它显示一个表单在另一个表单的顶部
我希望你能理解这个问题,你能帮助我。
如何解决此问题?您的代码段太长。你的问题似乎很简单,但这里的“东西”太多了。试着把它缩小到尽可能小的尺寸,只看到相关的元素(这种方法甚至可以帮助你自己解决问题)。。。我确实尽我所能把这些片段弄得最小。这些只是与我的问题有关的因素。问题是我已经想出了所有我能想到的,但没有好结果,这就是为什么我寻求帮助。你能给我一些意见吗,或者如果你看到代码中有错误的地方。特别是更新值??
<p:dialog header="Notas del Expediente" width="950"
widgetVar="dialogNotaView" resizable="true" minWidth="950"
showEffect="slide" hideEffect="fade">
<p:panelGrid columns="2" width="930">
<p:panelGrid columns="1" width="75">
<p:commandLink title="Notas" onclick="return false;" style="margin:0 auto">
<center>
<p:graphicImage value="/images/nota.png"/>
</center>
</p:commandLink>
</p:panelGrid>
<p:panel id="panelViewNotas" header="Notas del Expediente" width="830">
<center>
<h:form id="formNotas">
<p:messages id="messagesNotas" showDetail="true" autoUpdate="true" />
<p:panelGrid id="panelTabNotas" columns="2" width="800">
<f:facet name="header">
Nota
</f:facet>
<p:graphicImage value="/images/nota.png" />
<h:outputText value="Nota" />
<h:outputText value="" />
<h:outputText value="" />
<h:outputText value="Nombre/Tema *" />
<p:inputText value="#{reporteConsultorBean.notaView.nombre}" required="false" requiredMessage="Es necesario que ingrese el asunto"
size="50" maxlength="49" />
<h:outputText value="Descripción *" />
<p:inputTextarea value="#{reporteConsultorBean.notaView.descripcion}" rows="4" cols="65" maxlength="270"
required="false" requiredMessage="Es necesario que ingrese la descripción de la nota." />
</p:panelGrid>
<br/>
<p:panelGrid columns="2" >
<p:commandLink actionListener="#{reporteConsultorBean.saveNota}"
update=":formMain:growl,:formMain:formNotasResult:panelResultadoNotas,:formMain:formNotas:panelTabNotas,:formMain:formNotas:messagesNotas" title="Guardar Nota" style="margin:0 auto" >
<center>
<p:graphicImage value="/images/guardarBoton.png"/>
</center>
</p:commandLink>
<p:commandLink title="Cerrar" onclick="dialogNotaView.hide(); return false;" style="margin:0 auto">
<center>
<p:graphicImage value="/images/cerrarBoton.png"/>
</center>
</p:commandLink>
</p:panelGrid>
</h:form>
<br/>
<p:separator style="width:700px;height:10px" />
<br/>
<h:form id="formNotasResult">
<p:panel id="panelResultadoNotas" header="Notas del Expediente" width="830">
<p:dataTable id="tablaNotasResumen" var="notaResumen"
value="#{reporteConsultorBean.notasExp}" rowKey="#{notaResumen.idNota}"
paginator="true" rows="4" emptyMessage="No hay registros"
selectionMode="single" selection="#{reporteConsultorBean.notaSelected}">
<p:column headerText="Nombre/Asunto">
#{notaResumen.nombre}
</p:column>
<p:column headerText="Descripción"> #{notaResumen.descripcion}
</p:column>
<p:column headerText="Creador">
#{notaResumen.actividad.creador}
</p:column>
<p:column headerText="Fecha Creación">
<h:outputText value="#{notaResumen.actividad.fechaCreacion}">
<f:convertDateTime type="date" pattern="dd-MM-yyyy"/>
</h:outputText>
</p:column>
<p:column>
<p:commandLink title="Editar Nota"
update=":formMain:formNotas:panelTabNotas"
action="#{reporteConsultorBean.editarNota(notaResumen)}">
<p:graphicImage value="/images/editarBoton.png" />
</p:commandLink>
</p:column>
</p:dataTable>
</p:panel>
</h:form>
</center>
<br/>
</p:panel>
update=":formMain:formNotasResult:panelResultadoNotas,:formMain:formNotas:panelTabNotas"