p:commandlink not working with f:setPropertyActionListener

UI Components for JSF
Post Reply
dark_prime
Posts: 46
Joined: 02 Dec 2010, 14:30

09 Nov 2011, 18:22

Hi using PF 2.2.1

Having trouble calling f:setPropertyActionListener in a p:carousel

the setter for auction in the backing bean is never called - the showcase cant be working like this..

Code: Select all

				<p:carousel value="#{auctionController.getCurrent()}"
					autoPlayInterval="3500" var="carouselAuction" circular="true"
					rows="1" effect="easeInStrong"
					rendered="#{auctionController.areThereCurrentAuctions()}">
					<p:panel id="panel" style="width:950px;">

						<h:panelGrid columns="8" style="width:100%" cellpadding="5">
						
							<p:commandLink update="auctionDialog" oncomplete="auctionDialog.show()" style="text-decoration: none">
								<f:setPropertyActionListener value="#{carouselAuction}" 
									target="#{auctionController.auction}"/>
								
								
								
							
							<h:outputText value="#{carouselAuction.title}"
									styleClass="auctionTitle" />
							</p:commandLink>

                                              </p:carousel >


dark_prime
Posts: 46
Joined: 02 Dec 2010, 14:30

10 Nov 2011, 10:05

nobody has had problems with this before? or a working example ?

dark_prime
Posts: 46
Joined: 02 Dec 2010, 14:30

10 Nov 2011, 18:07

Solved.

unless there is no <p:column> tag within the carousel the command link <f.setPropertyActionListener> is not called.

figds
Posts: 3
Joined: 23 Mar 2012, 22:04

15 Aug 2012, 16:15

dark_prime, i'm having the same problem but couldn't fix it yet. How did you do it?

Here is the code i´m using:

<p:dataTable id="observadoresAgregar" var="observador" value="#{crearProgramaAuditoriaVC.auditoriaProgramadaActual.observadores}" paginator="true" rows="10"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
rowsPerPageTemplate="5,10,15">
<f:facet name="header">
<p:commandLink id="agregarObservadoresAgregar" update=":dialogFormObservadores:displayObservadores" oncomplete="observadoresDialog.show()">
<h:graphicImage value="/images/modal/mas.png" style="border:0"/>
</p:commandLink>
Observadores
</f:facet>
<p:column>
<f:facet name="header">ID</f:facet>
<h:outputText value="#{observador.id}" />
</p:column>
<p:column>
<f:facet name="header">Nombre</f:facet>
<h:outputText value="#{observador.nombre}" />
</p:column>
<p:column>
<f:facet name="header">Operaciones</f:facet>
<p:commandLink id="selectButton7" update=":dialogFormObservadorEliminar:display" oncomplete="observadorEliminarDialog.show()" title="View">
<h:graphicImage value="/images/modal/ver.png" style="border:0"/>
<f:setPropertyActionListener value="#{observador}" target="#{crearProgramaAuditoriaVC.observadorEliminar}" />
</p:commandLink>
</p:column>
</p:dataTable>

If I change the p:commandLink tab for for a commandButton, it works fine:
<p:commandButton id="selectButton5" process="@this" update=":dialogFormObservadorEliminar:display" oncomplete="observadorEliminarDialog.show()" icon="ui-icon-search" title="View">
<f:setPropertyActionListener value="#{observador}" target="#{crearProgramaAuditoriaVC.observadorEliminar}" />
</p:commandButton>



thank you very much for your help!

User avatar
sudheer
PrimeFaces Core Developer
Posts: 4345
Joined: 16 Oct 2011, 19:19
Location: Singapore

15 Aug 2012, 16:35

@figds

Why you didn't use process attribute for commandLink only(used in commandButton). :roll:
Set "process" attribute in your p:commandLink to @this and then try. :)
Author,Speaker
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/

___________________
Sudheer Jonna

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

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