Error in dataTable with dynamic columns and boolean checkbox

UI Components for JSF
Post Reply
tcnguyen
Posts: 36
Joined: 05 Apr 2011, 13:34

14 Oct 2011, 11:06

I have the following dataTable with dynamic columns containing selectBooleanCheckbox:

Code: Select all

<p:dataTable var="row" value="#{tableBean.rows}">
	<p:column headerText="Title">
		<h:outputText value="#{row.title}" />
	</p:column>

	<p:columns value="#{tableBean.columns}" var="col" columnIndexVar="index" id="col#{index}">
		<f:facet name="header">
			<h:outputLabel value="#{col.category}"/>
		</f:facet>
		<p:selectBooleanCheckbox value="#{row.options[index]}"/>
	</p:columns>
</p:dataTable>

Code: Select all

public class TableBean {
    private List<TableRow> rows;
    private List<TableClolumn> columns;
    ...
}

Code: Select all

public class TableRow {
    private List<Boolean> options;
    private String title;
    ...
}
I cant change value of one checkbox. If I select/deselect one checkbox, it changes all checkboxes on the same row.
Is it a bug?
PrimeFaces 3.0.RC1 / Spring Webflow 2.3.0.RELEASE / SpringSource tc v2.1 / Tomcat 6.0.29.C.RELEASE

bitec
Posts: 44
Joined: 20 Jan 2011, 21:34
Location: Russia

14 Oct 2011, 18:11

Table with dynamic columns does not support action components yet.

See http://code.google.com/p/primefaces/iss ... %20Summary
JSF: Mojarra 2.1 | PrimeFaces 2.2.1 | Glassfish 3.1

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: Google [Bot] and 52 guests