Problems with commandLink and commandButton

UI Components for JSF
Post Reply
Kaelin
Posts: 5
Joined: 10 Feb 2011, 06:55

10 Feb 2011, 07:13

I have been fighting with this all day.
My issue is with both commandLink and commandButton. I can't get the action or actionListener method to fire on my managed bean when I use AJAX. I get no exception or message. I have tried ViewScoped and SessionScoped. When i set ajax="false" my method in the bean is hit like it should be.

Finally tonight I fired up the showcase app and commandLink and commandButton both work fine. I copied the primefaces 2.2 snapshot jar out of the showcase app into my app and now my app is working fine. There is something different between the snapshot and the 2.2 release but I'm not sure if it is a configuration issue or not. I tried to copy the 2.2 release into the showcase app but that didn't go so well and it's getting too late to look into that tonight.



Primefaces 2.2 with Mojarra-2.0.3-FCS and Tomcat 7.0.8
Primefaces 2.2.1
Mojarra-2.0.4
Tomcat 7.0.8

User avatar
ydarcin
Posts: 258
Joined: 04 Jan 2009, 19:02
Location: Turkey

10 Feb 2011, 12:45

Hi,

did you do sth like p:commandLink/Button process="@this" ...

maybe process="@this" is missing and causing problem.

Yigit

Alex
Posts: 256
Joined: 16 Dec 2010, 14:24
Location: Germany

10 Feb 2011, 16:25

The missing process="@this" helped me with the same issue.
Why is this attribute now needed?
PrimeFaces 3.2
Mojarra 2.0.2
Glassfish 3.0.1

User avatar
ydarcin
Posts: 258
Joined: 04 Jan 2009, 19:02
Location: Turkey

10 Feb 2011, 16:44

Hi,

we can think this as who is making the request for ajax. it is like if there is a regular and your h:command** should be inside the form to trigger stuff, same case here with Ajax stuff.

Yigit

Kaelin
Posts: 5
Joined: 10 Feb 2011, 06:55

10 Feb 2011, 19:41

This still doesn't work for me. I tried using @this and @all in the process and still did not get a hit on my method. I swapped the primefaces jar with 2.2RC2 and it works again. Something is different between RC2 and the 2.2 release.

Code: Select all

<p:commandLink process="@this" update="centerLayout" action="#{editMemberBean.loadMemberDetail}">
    <h:outputText value="#{editMemberBean.lastName}" />
</p:commandLink>
Primefaces 2.2.1
Mojarra-2.0.4
Tomcat 7.0.8

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 34 guests