Error in Row selection

UI Components for JSF
Post Reply
publicdinamicpi
Posts: 7
Joined: 09 Sep 2011, 15:55

19 Sep 2011, 13:26

With version 2.2.1, rowSelection works fine.
After upgrading to version 3.0.M3, if I select one by one works fine, but when I select all, I get:


http://www.imagengratis.org/?v=errorjsonrows.jpg

and however the method in object c looks like:


http://www.imagengratis.org/?v=errorjsonmx9fm.jpg

This is my code:

Code: Select all

<p:dataTable var="currentCar" value="#{tableExportClearBean.cars}"
			paginator="true" rows="#{defaultValue.listEntriesString}"
			selection="#{tableExportClearBean.selectedCars}"
			rowKey="#{currentCar}" id="carsTableForEachAndPrime"
			rowIndexVar="rowNum" widgetVar="carsTableForEachAndPrimeWidget"
			paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
			rowsPerPageTemplate="#{defaultValue.pagination}"
			resizableColumns="false"
			emptyMessage="No records found. Revise yours filters.">

			<p:column id="Selection" selectionMode="multiple">
				<f:facet name="header">
					<h:outputText value="Selection" />
				</f:facet>
			</p:column>
...
I think in: var a=c.attr("id").split("_r_")[1].split("_"). the function attr("id") is malformed. Cause for instance this is the automatic id of each row:

<tr class="ui-widget-content ui-datatable-even even-row" id="form_Name:tableName_r_0_package.class@162895f">


My last column contains one button details and one icon dragable. If I insert them into a panelGrid I get the error. If I remove the panelGrid works "fine".

with error:

Code: Select all

<p:column id="details" headerText="Details">
				<h:panelGrid columns="2">
					<p:commandButton id="idButtonDetails"
						update="form_carDetailsDialog:display"
						oncomplete="carDetailsDialog.show()"
						image="ui-icon ui-icon-search" title="View Car Details"
						action="#{tableAllBean.showSelected(currentCar)}">
					</p:commandButton>
					<h:outputText id="dragIcon" styleClass="ui-icon ui-icon-arrow-4" />
					<p:draggable for="dragIcon" revert="true" stack="false" />
				</h:panelGrid>
	
			</p:column>
With no error:

Code: Select all

<p:column id="details" headerText="Details">
<!--				<h:panelGrid columns="2">-->
					<p:commandButton id="idButtonDetails"
						update="form_carDetailsDialog:display"
						oncomplete="carDetailsDialog.show()"
						image="ui-icon ui-icon-search" title="View Car Details"
						action="#{tableAllBean.showSelected(currentCar)}">
					</p:commandButton>
					<h:outputText id="dragIcon" styleClass="ui-icon ui-icon-arrow-4" />
					<p:draggable for="dragIcon" revert="true" stack="false" />
<!--				</h:panelGrid>-->
	
</p:column>

 :roll: 


Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: Baidu [Spider] and 27 guests