Announcement

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

    LiveGrid (Lazy load) concept

    Please help me to clear the LiveGrid (lazy load) concept,
    correct me if I'm wrong.

    I want to implement a SmartGWT web page using DataSouce to
    fetch data from MySQL. The database query will be implemented
    by PHP. I found there are LiveGrid and lazy load support in
    SmartGWT's DataSource ... do I need to do anything in my PHP
    to enable this features ? Or simply return all SQL query result
    in a huge JSON formatted string ... than let SmartGWT's
    DataSource to take care of the paging, cache ... issue by itself ?

    Before SmartGWT, I use AJAX directly ... I need to pass parameters
    such as recordStartID, recordStopID to my PHP code. Manage
    recordStartID and recordStopID in Javascript and make sure only
    couple results (recordStopID-recordStartID) will be fetched by
    my PHP code (no huge data will cross network per query).

    Do I still need to parse parameters such as recordStartID,
    recordStopID in my PHP when working with SmartGWT's
    DataSource ? If I need to do that, what parameters I will
    see in my PHP code ? Any PHP backend examples which
    I can reference ? Thanks a lot.

    Regards
    KC

    #2
    Take a look at the RestDataSource. It passes the requested range of rows via the "_startRow" and "_endRow" HTTP parameters. You should ideally take these values and use them in the LIMIT clause in MySQL, so that you return only the requested rows.

    Comment

    Working...
    X