Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    SmartGWT DataSource with HTTP URL

    1. I am using Smart GWT latest version 2.4.
    I have a ListGrid which gets the data from the DataSource. The datasource is pointing to a HTTP servlet URL.
    dataSource.setDataURL(http://servlet/TestServlet).
    I am setting a http request parameter(status=Active) as below
    DSRequest request = new DSRequest();
    request.setParams(criteriaMap); // has key = status; value = Active
    dataSource.setRequestProperties(request);
    Now ListGrid.fetchData() will fetch all the records where status is Active

    2. I have 2 buttons called Pending and Failed, on click of Pending, I have to pass status as Pending and fetch all the records with Pending, same with the case of Failed button click also.

    I want to achieve this with the same ListGrid, the grid should refresh and display correcponding records on click of respective buttons.

    Can anyone please suggest the way I can achieve?

    Thanks in advance

    #2
    Why you trying to use request parameters for passing fetch criteria ?
    You can use ListGrid.fetchData(Criteria criteria)

    Comment

    Working...
    X