[PrimeFaces 1.0.2 - Ajax Datatable] P;commandLink problem

UI Components for JSF
Post Reply
francesco.timperi
Posts: 4
Joined: 02 Jun 2010, 11:35

02 Jun 2010, 15:25

Hello to all...i'm incurring in a strange behaviour using Jsf 1.2 mojarra+facelets+primefaces 1.02 on an application running on weblogic 10.

I've a facelets page defining a p:datatable component with a nested p:commandLink invoking an action on the seleted rows, i.e.

Code: Select all

<p:dataTable id="euRequestDataTable" 
			                styleClass="data" 
			                value="#{euBusinessMergeRequestBean.records}" 
			                var="euGroup"  
							rows="#{euBusinessMergeRequestBean.rowsPerPage}" 
							rowIndexVar="rowIndex" 
							first="#{euBusinessMergeRequestBean.rowIndex}" 
							paginator="true"														
							dynamic="true">
                                        <p:column id="gnameCol">
					<f:facet name="header">
									<h:outputText value="#{bundle.GroupNameCaption}"/>
					</f:facet>
					    <p:commandLink action="#{euBusinessMergeRequestBean.loadRequestGroupDetailAction}" id="loadRequestDetailAction" ajax="false" value="#{euGroup.groupName}" immediate="true">
 <f:setPropertyActionListener target="#{euBusinessMergeRequestBean.selectedUuid}" value="#{euGroup.uuid}"/>								  									  
					</p:commandLink>																	  
				</p:column>
</p:dataTable>
When the application opens for the first time the page we see the datatable is well rendered and for each row the inside link correctly works. When we change page using the datatable paginator the pagination works fine, but the link disappear, i.e. the value is correctly writed but it is not a working link (it appear as standard text inside the column).

It seems that the commandLink renderer works differently when called inside the method DataTableRenderer.encodePartially, as if i'm not wrong this method is called only when we use the pagination in dynamic mode.

I've tried also in using an h:commandLink but in this case i get a DataError raised from jquery when it parse the xml generated by the DataTableRenderer.encodePartially method (i've verified this using firebug and in this case the generated xml is not well formed).

Any idea to solve this problem? We need ajax pagination as sometimes our application shows a lot of rows.

Thanks

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

04 Jun 2010, 10:37

Hi,

Having commandLinks inside a paginated datatable is a UI I commonly use, does it work well when ajax="true" ?

francesco.timperi
Posts: 4
Joined: 02 Jun 2010, 11:35

04 Jun 2010, 14:20

Hello,

if i put the parameter ajax="true" the commanLink never works. i've tried to use also RichFaces 3.3.3 as datatable component but also in this case as soon as a switch page the link doesn' work. The problem may be related to facelets or something else?

francesco.timperi
Posts: 4
Joined: 02 Jun 2010, 11:35

04 Jun 2010, 16:48

Hello,

as my project is using mojarra implementation provided with weblogic (1.2_04) i copied the last stable release of mojarra (1.2_14) under WEB-INF/lib folder of my webapp. With the new library the commandLink is always rendered in the right way (as a linkof course), but when i change from page 1 to page 2 the commandLink action is never fired!

As a second test i've created a simple webapp with same libraries but without facelets and in this case the action of a commandLink inside a p:dataTable component with ajax pagination works well as expected.

Any idea???

I'm using facelets 1.1.15

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

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