简体   繁体   中英

Don't receive events in PrimeFaces DataTable if I extend it

I am extending the PrimeFaces DataTable. When I do this, I no longer get the Ajax events that I receive when I don't extend it. It isn't anything that I do in the extension because I removed all methods in my overridden DataTable and still no Ajax events.

Here is the relevent code:

public class MyDataTable extends DataTable {
}

In my faces-config.xml:

<component>
    <component-type>org.primefaces.component.DataTable</component-type>
    <component-class>com.xxx.MyDataTable</component-class>
</component>

That's it...after doing this, the events that the DataTable normally receives (in my case it is the contextMenu event) don't get received any more. Besides that, the DataTable seems to function like it does normally.

Do I need to do something else to cause the events to flow? I can't figure out if this is something I am doing, a PrimeFaces bug or a MyFaces bug.

I got the PrimeFaces source code and put a breakpoint in the queueEvent(event) method. It gets hit if I don't extend the control but doesn't if I extend it.

I am using PrimeFaces 3.5 and the MyFaces 2.1.5 implementation that comes with WebSphere 8.5.1.

Thanks for any help. Nobody on the PrimeFaces forum replied to my question so I am really getting desperate...

I renamed my custom dataTable to DataTable and get the Ajax events.

public class DataTable extends org.primefaces.component.datatable.DataTable {
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM