datatable - Primefaces p:commandLink not working in p:datatTable -


i don't it...

why p:commandlink not working? page refreshing same amount of data in table. i'm supposing controller okay. take look.\

view:

    <?xml version='1.0' encoding='utf-8' ?> <!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"       xmlns:ui="http://java.sun.com/jsf/facelets"       xmlns:h="http://java.sun.com/jsf/html"       xmlns:f="http://java.sun.com/jsf/core"       xmlns:p="http://primefaces.org/ui">      <body>         <ui:composition template="./template.xhtml">             <ui:define name="content" >                 <f:view>                     <h:form style="padding: 5px">                         <p:datatable id="datatable2" var="item" value="#{warningscontroller.warns}">                             <p:column rendered="#{logincontroller.admin}">                                 <f:facet name="header">                                     <h:outputtext value="administracja" />                                 </f:facet>                                 <h:form>                                     <p:commandlink id="remove" value="remove" action="#{warningscontroller.remove(item.id)}" ajax="false" />                                 </h:form>                             </p:column>                         </p:datatable>                     </h:form>                 </f:view>             </ui:define>         </ui:composition>      </body> </html> 

and controller:

public string remove(long a){     //system.out.println(a);     pf.remove(pf.find(a));     return "listsev.xhtml"; } 

you have multiple h:forms cascaded/nested, that's invalid html. unknown/wanted side effects can/may occur, maybe experiencing right now. right if inner h:form , try again.

in remove method, pf list return calling #{warningscontroller.warns}?


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -