0 Replies Latest reply on Jan 5, 2012 5:11 PM by jolacitrouille

    a4j:commandLink action not called in rich:dataTable when using my own DataModel

    jolacitrouille Newbie

      Hi all,

       

      At work I am working on a very sensitive project, where the deadline is getting really short and I am struggling with a problem out of my league....

       

      I am using richfaces 3.3.0.GA and jsf 1.2

       

      I developped my own DataModel in order to have filtering and sorting done in db. I based my code on the BaseModifiableHibernateDataModel of richfaces livedemo (see http://anonsvn.jboss.org/repos/richfaces/branches/community/3.3.X/samples/richfaces-demo/src/main/java/org/richfaces/demo/modifiableModel/BaseModifiableHibernateDataModel.java). The main difference I did is to use a DataProvider to access data instead of doing directly the request there.

       

      I then replaced the value of my <rich:dataTable/> by my new DataModel and everything worked very well. I was able to filter, sort and change page through a DataScroller. So, everything was fine, until I reallized the action method binded to all the buttons (<a4j:commandLink/>) in my <rich:dataTable/> wheren't called anymore.. They were generating a server request, but the corresponding action methods weren't called in the Invoke Phase anymore... But if I changed the value of my <rich:dataTable/> back to a List<> or to another DataModel such as ListDataModel or ExtendedDataTableModel the buttons were working fine...

       

      I spend 2 days on it and can't figure out what is going on... Time is flying and the project is running out of budget.. Could someone please have a look at my problem ?

       

      I put together a very small example depicting precisely the problem. Please, find it attached to this post!

       

      If you run the code a click on the 'CLICK' button won't call the method edit of the testController.... But if in test.xhtml, you replace #{testController.itemsMyDataModel} by any of #{testController.items}, #{testController.itemsExtendedTableDataModel} or #{testController.itemsModifiableDataModel} everything will work fine and "!! EDIT !!" with be written in the standard output..