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.


#TechXchangePresenter
 View Only
Expand all | Collapse all

Need help using a refresh button to reset table to first row

  • 1.  Need help using a refresh button to reset table to first row

    Posted Thu April 01, 2010 08:02 PM

    I have a portlet with an IS service that shows a query result as an Async table. The table has the DataNextPrev and DataTotal objects added to the footer. When the IS service was generated, an Async Command button called “Refresh” was included. Unfortunately, this button does nothing but repaint the screen. I want a “Refresh” button that will re-display the Async table, beginning with the 1st row - in other words, reset the DataNextPrev object to point to the beginning; or close the table, clear the DataNextPrev object, and reset other values (like a dropdown list box) to their initial state.
    So, does anyone have experience with a “refresh” function? and/or with programming the DataNextPrev object?


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


  • 2.  RE: Need help using a refresh button to reset table to first row

    Posted Tue April 06, 2010 11:06 AM

    Hi
    The mentioned “Refresh” makes a call to the IS service to retrieve whatever results the service delivers.
    If instead of refreshing the table contents you want to “go back” to displaying the first row, you could use the following javascript (supposing ‘asyncTable’ is your table’s id):

    CAF.model('#{caf:cid('asyncTable')}').go(0,-1,null);

    If you were using v7.x instead of v8, you would need a different method to get the table’s client side id. It would look like:

    CAF.model('#{activePageBean.clientIds['asyncTable']}').go(0,-1,null);

    Hope this helps,
    Javier


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


  • 3.  RE: Need help using a refresh button to reset table to first row

    Posted Tue April 06, 2010 03:16 PM

    Thanks, Javier! I am running on 7.2 Designer and just before leaving for the day yesterday I tried the 2nd option you noted in your post. Only, I only have (0) as the argument for the “go” method. It does, indeed, do what I want. Now, if I understood what the other arguments (-1, null) actually mean, I’ll make use of them.

    Thanks again for your reply!


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


  • 4.  RE: Need help using a refresh button to reset table to first row

    Posted Tue April 06, 2010 03:33 PM

    The second argument is the number of rows that can be displayed and the third one, optional, sorting info.
    You can find the exact description in the docu (for version 8.0 you can find it here [url]http://techcommunity.softwareag.com/ecosystem/documentation/webmethods/wmsuite8_ga/My_webMethods_and_Task_Engine/8-0-SP1_CAF_JavaScript_Reference/index.html[/url]

    best regards
    Javier


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