Row selection with <p:column selectionMode="">

UI Components for JSF
Post Reply
hfcprime
Posts: 108
Joined: 22 Feb 2011, 20:32

12 Jul 2011, 23:23

Why do this

<p:panel id="reqDistTable" toggleable="true" collapsed="false">
<p:messages id="distMessage" display="both" showDetail="false" showSummary="true"/>
<p:dataTable id="distTable" var="dist" value="#{editDist.distTable}"
selection="#{editDist.selectedDist}" >

and this

public class RequisitionDistribution ... {
...
public void setSelected(DistributionRecord dr) {selected = dr;}
...
public List<DistributionRecord> getDistTable() { ...}
}

produce this exception?

Caused by: javax.el.PropertyNotFoundException: /WEB-INF/flows/search/editLineItem.xhtml @100,46 selection="#{editDist.selectedDist}": Property 'selectedDist' not readable on type com.kve.requisitions.data.requisition.detail.DistributionRecord
at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:111)
at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:193)
at org.primefaces.component.datatable.DataTable.getSelection(DataTable.java:223)
at org.primefaces.component.datatable.DataTableRenderer.encodeTbody(DataTableRenderer.java:444)

DistributionRecord is the row record. The property is being looked for on the wrong object as far as I can tell. These usages are exactly analogous to the Prime Showcase example of row selection using <p:column selectionMode="single"/>

Prime 3.0M1, mojarra 2.04, Spring (Sec, WF), tomcat 7.014
ENVIRONMENT
Angular 5.2.4, CLI 1.6.8, PrimeNG 5.2.0, Chrome 64.0.3282.186, Angular CLI project in Webclipse IDE, Win 10 Pro

hfcprime
Posts: 108
Joined: 22 Feb 2011, 20:32

12 Jul 2011, 23:53

I switched 3.0M! to 3.0M2 and the table rendered. Clicking the radio button does not call the selection setter however. Also, in M2 I have the problem mentioned in another recent post of the close dialog listener not being called when the user closes the box, which does work in M1. Whew.
ENVIRONMENT
Angular 5.2.4, CLI 1.6.8, PrimeNG 5.2.0, Chrome 64.0.3282.186, Angular CLI project in Webclipse IDE, Win 10 Pro

hfcprime
Posts: 108
Joined: 22 Feb 2011, 20:32

13 Jul 2011, 02:45

I take that back, selecting the row (with the radio button mode="single") does call the selector. I had breakpoints set in Eclipse but it didn't stop or I missed it in the flow, which is fairly involved. I confirmed it with console printout. This is in 3.M3 snapshot so the problem with the selection var is moot.

The close event is not propagating for me or there is some new way to do it that I haven't found documentation for.
ENVIRONMENT
Angular 5.2.4, CLI 1.6.8, PrimeNG 5.2.0, Chrome 64.0.3282.186, Angular CLI project in Webclipse IDE, Win 10 Pro

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 14 guests