DMXzone Server Connect Support Product Page

Answered

Paged Query Show/Hide Previous and Next buttons.

Asked 02 Mar 2016 07:21:43
1
has this question
02 Mar 2016 07:21:43 Jeff Powell posted:
When running a paged query, I can show data and create Previous and Next buttons, and everything works, but I can't figure out how to hide the Previous button on the first page, and hide the Next button on the last page.

Replies

Replied 04 Mar 2016 19:13:30
04 Mar 2016 19:13:30 George Petrov replied:
Hi Jeff,

paging with the new server connect actions is very easy.

1. you have to make a server connect action with the new pages query step in it
2. execute it client side with the server action executor
3. next to the paging actions you can hide prev or next record with the data bindings hide, so for the prev you enter something like:

data-binding-hide="{{cars.data.query1.page.current == 1}}

for the next:

data-binding-hide="{{cars.data.query1.page.current == cars.data.query1.page.total}}"

where cars is my server action name and query1 is the query in it.

Hope this helps - soon we will make a more powerful paging extension that will contain all this functionality and much more.

Greetings,
George
Replied 04 Mar 2016 23:12:14
04 Mar 2016 23:12:14 Brad Lawryk replied:
So using the show if data like we used to no longer works?

data-binding-show="{{fullOpenJobsList.data.openJobs.page.offset.first}}"
data-binding-show="{{fullOpenJobsList.data.openJobs.page.offset.prev}}"
data-binding-show="{{fullOpenJobsList.data.openJobs.page.offset.next}}"
data-binding-show="{{fullOpenJobsList.data.openJobs.page.offset.last}}"
Replied 05 Mar 2016 07:43:40
05 Mar 2016 07:43:40 Jeff Powell replied:
That did it. Thank you. I look forward to the full paging extension.

Reply to this topic