Visual Builder

Get Involved. Join the Conversation.


    Anand Bolli
    Pagination for oj-table in vbcs
    Topic posted July 20, 2018 by Anand BolliRed Ribbon: 250+ Points, tagged JET, Web 
    629 Views, 7 Comments
    Pagination for oj-table in vbcs
    Oj-Paging-control tag data attribute data type


    I've been trying to implement pagination for an oj-table. I have added the tag to the html page and included the oj/ojspagingcontrol in the import. I can see the paging composite but cannot get it to work. I am unable to figure out the type of the variable that should be given in the data attribute. 

    I get the following error for any type i supply - 

    data.setPage() is not defined. 

    Can anyone direct me as to where should the oj.PagingModel interface be implemented to get this working? 



    • JT Thomas

      Is this the control you are importing?

      and you are adding the html tag after your table, like the example?

      <oj-paging-control id="paging" data='[[datasource]]' page-size='5'></oj-paging-control>

      So the question is what you need to pass to the data attribute?


      • Anand Bolli

        Yes i need to know the type of variable to pass to the data attribute. 

        I was trying to follow this example - 

        I have added the paging control html tag inside the oj-table tag. 

    • Alok


      I'm in similar situation here :( I've done the imports and everything, but cant manage to figure out how to pass the data attribute

      I've tried created a new type under page variables, and then created a variable. But Im not sure how do I go ahead and populate the variable with the data (the data comes from a rest service, if that info helps). I have created an event that does a rest call when the page loads and stores the value in the variable but that does not seem to work. 


    • Divinee Jac suguna Prince


      Do we have any solution for this, I am trying to implement pagination on the oj table with a service data provider array.

      I followed the Oracle jet cook book here. The pagination control appear but the table data is not populating always says intializing and data doesnt load (attached a screen shot) . I tried with both the  explicit definition of a array and the service data provider, i get the same result for both. 


      • M Sridhar

        It is working for me....This is the statement for populating the data

          self.datasource(new oj.PagingTableDataSource(new oj.ArrayTableDataSource(myArray)));


        myArray is the data you populate you get from the webservice

        • Trupti Chaudhari


            I have similar type of requirement.I have followed below steps:

          1) Called Rest webservice and assign response of webservice to Array type variable.

          2) Passed this array type variable to JS function.

          3) JS function:

             self.pagingDatasource = new oj.PagingTableDataSource(new oj.ArrayTableDataSource
             (array, {idAttribute: 'DepartmentId'}));

          My question is , how can i use self.pagingDatasource variable for VBCS table component? what should be the data type of VBCS variable to assign self.pagingDatasource JS variable.





    • Herman Mensinga

      I have written a post where I created a Web Component for this.