Unable to use on my primeface's datatable?

Don't try to put a p:ajax inside the the p:dataTable . This is one of the PrimeFaces components where you declare the Ajax-related attributes right in the component itself.

Up vote 1 down vote favorite share g+ share fb share tw.

I'm having some problems with datatable's instant row selection exactly it's giving me this error: Parent not an instance of ClientBehaviorHolder: org.primefaces.component.datatable. DataTable So I did some researches and I think it's a problem of version so I updated my version to 3.0. M3-SNAPSHOT but still the same error I wonder why!

Here is my page code: Select a row to display a message here is my function's code: public void redirection(SelectEvent event) throws Exception { System.out. Println("je suis laaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa : " ); currentChangerStatus=(ChangerStatus)event.getObject(); currentProjet=currentChangerStatus.getProjets(); System.out. Println("le projet est : " +currentProjet.getLibelle()); FacesContext.

GetCurrentInstance(). GetExternalContext(). Redirect("infoprojet.

Xhtml"); } may be I didn't integrated the primefaces jar correctly so here is my pom (because i'm using maven) : 4.0.0 com. Mycompany Gpsi 1.0-SNAPSHOT war Gpsi Web App ${project.build. Directory}/endorsed UTF-8 Tomcat70 org.

Hibernate hibernate 3.2.5. Ga org. Hibernate hibernate-entitymanager 3.3.2.

GA cglib cglib-nodep 2.1_3 antlr antlr 2.7.6 asm asm 1.5.3 javax. Sql jdbc-stdext 2.0 javax. Transaction jta 1.0.1B org.

Hibernate ejb3-persistence 1.0.1. GA unknown. Binary ojdbc14 SNAPSHOT org.

Primefaces primefaces 3.0. M3-SNAPSHOT javax javaee-web-api 6.0 provided junit junit 4.8.1 test javax. El el-api 2.2 provided org.glassfish.

Web el-impl 2.2 provided org. Springframework spring 2.5.6 org. Springframework spring-web 2.5.6 org.

Springframework spring-tx 2.5.6 org. Springframework spring-aop 2.5.6 org. Springframework spring-beans 2.5.6 org.

Springframework spring-context 2.5.6 org. Springframework spring-core 2.5.6 org. Springframework spring-jdbc 2.5.6 org.

Springframework spring-orm 2.5.6 commons-dbcp commons-dbcp 1.2.2 commons-pool commons-pool 1.4 commons-collections commons-collections 3.2 com.sun. Faces jsf-api 2.0.4-b09 com.sun. Faces jsf-impl 2.0.4-b09 javax.

Servlet jstl 1.1.2 org.primefaces. Themes aristo 1.0.1 commons-fileupload commons-fileupload 1.2.2 commons-io commons-io 2.0.1 taglibs standard 1.1.2 com. Itextpdf itextpdf 5.0.4 compile org.apache.maven.

Plugins maven-compiler-plugin 2.3.2 1.6 1.6 ${endorsed. Dir} org.apache.maven. Plugins maven-war-plugin 2.1 false org.apache.maven.

Plugins maven-dependency-plugin 2.1 validate copy ${endorsed. Dir} true javax javaee-endorsed-api 6.0 jar Gpsi http://download.java.net/maven/2/ jsf20 default Repository for library Libraryjsf20 http://repository.prime.com. Tr/ primefaces default Repository for library Libraryprimefaces unknown-jars-temp-repo A temporary repository created by NetBeans for libraries and jars it could not identify.

Please replace the dependencies in this repository with correct ones and delete this repository. File:${project. Basedir}/lib URL3 Maven Repository for iText http://maven.

Itextpdf.com/ greetings ajax jsf datatable jsf-2.0 primefaces link|improve this question edited Aug 3 '11 at 13:10 asked Jul 28 '11 at 8:54cascadox60310 57% accept rate.

Don't try to put a inside the the . This is one of the PrimeFaces components where you declare the Ajax-related attributes right in the component itself. Here is an example from the PrimeFaces documentation: ...columns See how the rowSelectListener attribute is declared right inside the?

The error you were getting: Parent not an instance of ClientBehaviorHolder This means that the parent tag cannot contain an Ajax tag. The example above is from the PrimeFaces 2.2 documentation, but I believe 3.0 is similar. EDIT: My mistake!

I replied from home and didn't have access to my code that uses PrimeFaces 3.0. In PF 3.0 (unlike PF 2.2) you can embed the element. Here is a code sample that works for me: Here are my listener methods signatures: public void onRowSelect(SelectEvent event) { // your code here... } public void onRowUnselect(UnselectEvent event) { // your code here... } I don't know enough about your webapp to understand how your redirect is meant to work, but I will also give you a code sample that I'm using in my webapp after the user clicks a Logout button and I redirect them to a "you are logged out" page.

This code is called from an action method. FacesContext ctx = FacesContext. GetCurrentInstance(); ExternalContext ectx = ctx.

GetExternalContext(); ServletContext sc = (ServletContext) ectx.getContext(); ectx. Redirect("http://somedomain.org/somepage.html").

Hey thanks for your answer what I want to do is call my function by selecting a row this function will redirect me to another page so I already tryed the example you posted but it's doesn't work, so I thought that may be I should try the instant row example: primefaces.org/showcase-labs/ui/… but still not working neither... – cascadox Jul 29 '11 at 0:32 here is my very simple function: public String redirection() { return "projetdetails"; } – cascadox Jul 29 '11 at 0:33 also here is my navigation case: /datatablenavigationtest. Xhtml projetdetails /infoprojet. Xhtml DataTable the strage thing is that i'm using 3.0.

M1 so I should work unless my primefaces integration is not done properly so you may have a look on my pom. Xml above and tell what you think... – cascadox Jul 30 '11 at 14:53 PrimeFaces 3.0-M1 was a terrible release. You should at least start using 3.0-M2 or just use the 3.0-M3-SNAPSHOT builds.

Your pom file would lead me to believe that you already are. – Jim Tough Jul 30 '11 at 21:26.

Try to keep one jar of primefaces i.e. Either 2.1.1 or 3.1.1 not both, they create conflicts. It works for me for the same error hopefully your will resolved as well.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions