aspose file tools*
The moose likes JSF and the fly likes <p:datatable selection  >not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "<p:datatable selection  >not working" Watch "<p:datatable selection  >not working" New topic
Author

<p:datatable selection >not working

Santosh Kumar V
Greenhorn

Joined: Mar 17, 2010
Posts: 5
Hi everyone,

I'm facing a problem when trying to select a row using <p:datatable selection>. I am getting the UI and trying to select using a radio button which i'm able to but the problem arises when i try to submit the selected row. according to Primefaces Showcase the selection attribute shud work fine which is not happening in my case.
http://www.primefaces.org:8080/prime-showcase/ui/datatableRowSelectionRadio.jsf;jsessionid=D60EE0D27CADDA5A144611ABCAED22DF.

The datatable code is :

<h:form>
<!--Try Using PrimeFaces Table with Radio Button-->
<p:dataTable var="seats" value="#{defineSeatAction.seatList}" rendered="#{defineSeatAction.seatList.size()!=0}" selection="#{defineSeatAction.testCenterSeat}">
<p:column selectionMode="single"/>
<p:column>
<f:facet name="header">
<h:outputText value="Seat Code"/>
</f:facet>
<h:outputText value="#{seats.seatCode}"/>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="Workstation OS"/>
</f:facet>
<h:outputText value="#{seats.workstationDetails}"/>
</p:column>
</p:dataTable>
<h:commandButton value="Submit" action="#{defineSeatAction.save}"/><br/>
</h:form>

and the Error StackTrace is:

17:40:15,170 WARN [ExceptionFilter] handling uncaught exception
javax.servlet.ServletException: /testcenter/define_seats.xhtml @57,182 selection="#{defineSeatAction
.testCenterSeat}": java.lang.IllegalArgumentException: argument type mismatch
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j
ava:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:532)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j
ava:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:390)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:517)
at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j
ava:235)

where seatList and testCenterSeat are of type Seat
Santosh Kumar V
Greenhorn

Joined: Mar 17, 2010
Posts: 5
Hey Everyone,

The problem is resolved. I was using an older version of PrimeFaces (1.0.0.RC).

Cagatay Civici gave a clue about it in the primefaces forum so for anyone else's reference use PrimeFaces Version 1.0.0 for JSF 1.2

Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: <p:datatable selection >not working
 
Similar Threads
Problem with rich:listShuttle
JSF not restore view
Rich:tree and managing expand/collapse from first load
check box in simple html tag in jsf
a4j:Support and Component Binding don't like each other