IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  Async Table - Beyond End Of Data?

    Posted 02/07/11 07:44 AM

    I’m using an async table to display query results in a portlet. It’s set to display 10 rows with the ability to navigate to the next/prev page when there are more rows returned. My problem comes in when I run a query that returns >10 rows and I then navigate to the next page, then run a new query which returns <10 rows. I get a message “Beyond End Of Data” and have to click on “previous” in order to view the results.

    Is there any way to reset the table to the first page when I run the query?

    Thanks :slight_smile:


    #webMethods-BPMS
    #MWS-CAF-Task-Engine
    #webMethods


  • 2.  RE: Async Table - Beyond End Of Data?

    Posted 02/07/11 10:47 AM

    hi
    do you refresh the table after running the query?

    regards,
    Javier


    #MWS-CAF-Task-Engine
    #webMethods
    #webMethods-BPMS


  • 3.  RE: Async Table - Beyond End Of Data?

    Posted 02/07/11 11:04 AM

    I think so… the table is “linked” to a web service call, and clicking the Query button executes the Refresh() of the web service. Does this refresh the table automatically? Or do I have to do it manually in code?


    #MWS-CAF-Task-Engine
    #webMethods-BPMS
    #webMethods


  • 4.  RE: Async Table - Beyond End Of Data?

    Posted 02/07/11 02:06 PM

    well, if you use an Async Command Button to call the WSC and leave its refresh property empty (which should refresh the whole view), that should refresh the table as well…
    what happens if you explicitly set the refresh of your button to refresh the table?
    regards
    Javier


    #webMethods
    #MWS-CAF-Task-Engine
    #webMethods-BPMS


  • 5.  RE: Async Table - Beyond End Of Data?

    Posted 02/07/11 02:20 PM

    Tried the refresh property (of the async command button) as empty and specified to the table and although it does seem like it’s refreshing, it’s not going back to the first page, it stays on the page saying “Beyond End Of Data”


    #MWS-CAF-Task-Engine
    #webMethods-BPMS
    #webMethods


  • 6.  RE: Async Table - Beyond End Of Data?

    Posted 02/07/11 04:35 PM

    You can adjust the table’s paging state in your action by getting a
    reference to the table component (you can create a getter for this on
    your page bean by right-clicking the control in the view editor and
    selecting Source > Create Control Accessor) and setting
    the table component’s “first” property to the index of the first row to
    display, and/or its “rows” property to the number of rows to display.
    Alternately, if you have those properties bound to a property on some
    bean (like your page bean), you can just adjust those properties on that
    bean.

    With the jsf table’s design the paging of the ui is independent of
    the data model. The ui (the table control) doesn’t necessarily know
    when the data model changes, or whether it’s been changed by a ui add
    operation or by some remote change to the back-end data store. That’s
    why you have to manually adjust the table control’s paging state.


    #webMethods
    #MWS-CAF-Task-Engine
    #webMethods-BPMS


  • 7.  RE: Async Table - Beyond End Of Data?

    Posted 02/08/11 02:38 AM

    Add the following piece of code in a Script Block towards the end of your view by giving the ID of your Async Table Control appropriately.

    
    var windowLoaded = window.onload;
    if(windowLoaded)
    {
    CAF.model("#{activePageBean.clientIds['asyncTableId']}").go(0,-1,null);
    }

    Hope this helps,
    Best regards,
    Raj


    #MWS-CAF-Task-Engine
    #webMethods-BPMS
    #webMethods


  • 8.  RE: Async Table - Beyond End Of Data?

    Posted 02/08/11 05:05 PM

    Thanks for this, it’s working now :slight_smile:


    #MWS-CAF-Task-Engine
    #webMethods
    #webMethods-BPMS