Jsf p:commandLink不使用dataTable
我的dataTable由ajax调用填充,我的commandLink(在dataTable中)没有指向正确的位置,并且始终呈现相同的页面。请在控制台中显示: HtmlLabelRend W id为j_id1471051656_3ffdbef6的标签组件的属性“for”:未定义j_id1471051656_3ffdbfc6 但是,当我将commandlink放在datatable之外时,action方法工作得很好 这个问题很少见!,我怎样才能解决它 提前谢谢 我的Jsf页面:Jsf p:commandLink不使用dataTable,jsf,jsf-2,primefaces,Jsf,Jsf 2,Primefaces,我的dataTable由ajax调用填充,我的commandLink(在dataTable中)没有指向正确的位置,并且始终呈现相同的页面。请在控制台中显示: HtmlLabelRend W id为j_id1471051656_3ffdbef6的标签组件的属性“for”:未定义j_id1471051656_3ffdbfc6 但是,当我将commandlink放在datatable之外时,action方法工作得很好 这个问题很少见!,我怎样才能解决它 提前谢谢 我的Jsf页面: <h:form
<h:form>
<p:panel header="Busqueda">
<p:panelGrid style="width:100%;">
<p:row>
-----------------------------------(inputs)---------------------------------------
<p:column>
<p:commandButton value="Buscar" update="grilla"
action="#{devolucionAdminController.buscarSD()}">´
</p:commandButton>
</p:column>
</p:row>
</p:panelGrid>
<p:messages closable="true" redisplay="true" id="msj"></p:messages>
</p:panel>
<p:dataTable id="grilla" var="r"
value="#{devolucionAdminController.listado}"
emptyMessage="No se han encontrado solicitudes de devolución">
<p:column headerText="Sec">
<h:outputText value="#{r.idSoliDevo}" />
</p:column>
<p:column headerText="Cuenta">
<h:outputText value="#{r.cuentaId}" />
</p:column>
<p:column headerText="Ver Detalle Sol. Dev ">
<p:commandLink
action="#{bajaController.mostrarSolicitudBaja(r.cuentaId,r.idSoliDevo)}" ajax="false">
<p:commandButton icon="ui-icon-search" title="Ver Detalle" />
</p:commandLink>
</p:column>
</p:dataTable>
<!--works fine -->
<p:commandLink action="#{bajaController.mostrarSolicitudBaja(80003,340)}"
ajax="false">
<p:commandButton icon="ui-icon-search" title="Ver Detalle" />
</p:commandLink>
</h:form>
删除ajax=“false”标记,它对我有用删除ajax=“false”标记,它对我有用使用process=“@this”并使用actionListener而不是action
<p:commandLink process="@this" actionListener="#{bajaController.mostrarSolicitudBaja(80003,340)}"></p:commandLink>
使用process=“@this”并使用actionListener而不是action
<p:commandLink process="@this" actionListener="#{bajaController.mostrarSolicitudBaja(80003,340)}"></p:commandLink>
将commandLink替换为
<p:commandButton icon="ui-icon-search" title="Ver Detalle"
action="#{bajaController.mostrarSolicitudBaja(r.cuentaId,r.idSoliDevo)}" ajax="false"/>
真的不需要在命令链接中放置命令按钮,只需放置一个图标即可将您的命令链接替换为
<p:commandButton icon="ui-icon-search" title="Ver Detalle"
action="#{bajaController.mostrarSolicitudBaja(r.cuentaId,r.idSoliDevo)}" ajax="false"/>
真的不需要在命令链接中放置命令按钮,只需放置一个图标即可。我也遇到了同样的问题,我正在努力寻找解决方案,但没有任何效果。以下是我最终解决问题的方式:
- 我删除了
属性ajax
- 我添加了
process=“@this”
<p:commandLink process="@this" action="#{projsSummaryBacking.redirectProjTasks(proj)}" >
<h:outputText value="#{proj.title}" />
</p:commandLink>
我希望这能帮助别人/我也有同样的问题,我一直在努力寻找解决办法,但什么都不管用。以下是我最终解决问题的方式:
- 我删除了
属性ajax
- 我添加了
process=“@this”
<p:commandLink process="@this" action="#{projsSummaryBacking.redirectProjTasks(proj)}" >
<h:outputText value="#{proj.title}" />
</p:commandLink>
我希望这能帮助别人/m\为什么要在p:commandLink中放置p:commandButton,这毫无意义!在数据表中尝试以下代码:
嗨,我将代码放在数据表中,但我返回了一个不同的页面(主页)。而此代码
什么都没有,我获得了相同的结果…..为什么要在p:commandLink中放置p:commandButton,这毫无意义!在datatable中尝试此代码:
嗨,我将代码放入datatable中,但我返回了另一个页面(主页)。此代码
没有,我获得了相同的结果。。。。。