p:commandButton ajax not called inside p:dataList

UI Components for JSF
Post Reply
moonblade.wolf
Posts: 48
Joined: 07 Dec 2010, 02:46

20 Jul 2011, 14:30

I have a sophisticated method in my jsf bean :

Code: Select all

public void saySomething() {
	log.debug("SAY SOMETHING !");
}
And a simple button in the jsf :

Code: Select all

<p:commandButton 
	value="say something" 
	process="@this" update="@none" action="#{timetableBean.saySomething}" />
Clicking on the button, results in my simple logging :

Code: Select all

DEBUG PhaseTracker - BEFORE PHASE INVOKE_APPLICATION 5
DEBUG TimetableBean - SAY SOMETHING !
DEBUG PhaseTracker - AFTER PHASE INVOKE_APPLICATION 5
Let's go to next simple case.
When placing that identical button inside a p:dataList like this :

Code: Select all

<p:dataList id="groupUsers2" value="#{timetableBean.group.users}" var="user" itemType="circle" style="padding:0; margin: 0;">
	<p:commandButton 
		value="#{user.data['selected'] ? 'V' : 'X'}" 
		process="@this" update="@none" action="#{timetableBean.saySomething}" />
	<p:commandLink value="#{user.userId} - #{user.name}" process="@this" /> 
</p:dataList>
Clicking on the button, results in my simple logging :
DEBUG PhaseTracker - BEFORE PHASE INVOKE_APPLICATION 5
DEBUG PhaseTracker - AFTER PHASE INVOKE_APPLICATION 5
The method of saySomething() was not called !

What did i do wrong ?

moonblade.wolf
Posts: 48
Joined: 07 Dec 2010, 02:46

20 Jul 2011, 19:00

Problem solved.

Found the solution in here

Strange though, i didnt see this in the documentation, as it doesnt specify the p:column. Perhaps it's in the errata for primefaces 2.2.1 doc ?

Related problems here.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 29 guests