p:ajax events

UI Components for JSF
Post Reply
borkert
Posts: 21
Joined: 12 Sep 2011, 12:27

12 Sep 2011, 12:34

Hello,

where do I find a list of all the events that p:ajax supports?

Is there a doubleclick event that I could use on a datatable? I got a datatable and set dblClickSelect=true, then I used a "<p:ajax event="rowSelect" ..." to do something when a row is doubleclicked. I'd like to be able to select one or many table rows with a single click, because I have a "Delete"-Button that should delete the selected rows. Doubleclicking a row should open a dialog. Don't know how to do this.

Regards,

Sven
jetty-6.1.9 / Mojarra 2.1.3 / PrimeFaces 3.3.1

borkert
Posts: 21
Joined: 12 Sep 2011, 12:27

13 Sep 2011, 12:21

Another problem ist, that when you doubleclick a row, it gets selected and the dialog opens, but when you close the dialog the row is still selected and you can not doubleclick it again to reopen the dialog. Is there no better solution than this?

Regards,

Sven
jetty-6.1.9 / Mojarra 2.1.3 / PrimeFaces 3.3.1

ggr
Posts: 3
Joined: 19 Jul 2011, 15:59

14 Sep 2011, 00:11

As for your first question check the source code for component of your interest. For datatable (org.primefaces.component.datatable) you can see:

1. These imports:

Code: Select all

import org.primefaces.event.RowEditEvent;
import org.primefaces.event.SelectEvent;
import org.primefaces.event.UnselectEvent;
import org.primefaces.event.data.PageEvent;
import org.primefaces.event.data.SortEvent;
import org.primefaces.event.ColumnResizeEvent;
2. Method queueEvent that tells the name of the actual event you have to use in tags

From now on you can dig deeper into logic behind these events to find out what they're doing. If theres better reference for events or PF in general than it's source code I'd be glad to hear about it.

Cheers.
PrimeFaces-3.0.M3-SNAPHOT, Mojarra 2.1.0 (FCS 2.1.0-b11), Glassfish 3.1

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 49 guests