Where did the p:ajax Javascript "event" variable go in PF5?

UI Components for JSF
Post Reply
alfonx
Posts: 93
Joined: 15 Mar 2010, 18:50
Contact:

21 Jul 2014, 23:20

I am trying an upgrade from PrimeFaces-4.0.17 to 5.0.4 and Mojarra-2.1 to 2.2.7.

In PF 4 the code executed in onstart had access to a variable called event.

Code: Select all

<p:dataTable ...>
<p:ajax event="rowSelect" onstart="alert('starting...'); alert(event);" />
In PF 5 no variable event is available.

Did the name of the variable event change or is the event not accessible at that stage anymore?

Thanks
Steve
Greetings,
Steve

alfonx
Posts: 93
Joined: 15 Mar 2010, 18:50
Contact:

21 Jul 2014, 23:39

JFI: I used the event variable to get the selected row key prior to the ajax call. I just figured out, that the same can be done using the widgetVar.

Code: Select all

alert('First selected rowKey is ' + (PF('tableWidgetName').selection[0]).split('_')[0]
Still might be usefull to know if event has just been renamed or vanished.
Greetings,
Steve

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 32 guests