cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Pagination Navigation

SOLVED
alenaromi
Garnet

Pagination Navigation

Hi,
In my home screen I am using a paging widget for my grid in which double clicking each row navigates to another mashup.For example when I navigate from page 2 of my grid by clicking a row to another new mashup and return back to my home screen I need the grid values of page 2 to still be displayed.But instead the page 1 gird values are displayed by default.I tried passing the current page number as a parameter from my service to the navigated mashup and back to the home screen mashup but it doesn't work.I have attached my service below. How do I achieve this?

Inputs : deviceListInfotable,currentPage,pageSize
Outputs: Infotable with Datashape "PaginationDS"
Bindings: Widget's PageSize to service's pageSize
                Widget's PageNumber to service's currentPage


var dataShort = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape( {
infoTableName : "InfoTable",
dataShapeName : "DeviceListDS" });

for( var x = ( currentPage * pageSize ); x < deviceListInfotable.getRowCount() && dataShort.getRowCount() < pageSize; x++ )
{
dataShort.AddRow( deviceListInfotable.getRow( x ) );

}

var result = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape( {
infoTableName : "InfoTable",
dataShapeName : "PaginationDS" } );

}

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Pagination Navigation

Hello,

 

Depending on the needs of your mashup there may be other ways to solve this but one approach you could do would to be add an expression function and an event router to the mashup.

 

If you were to call this expression function taking the input or your mashup parameter it can then determine if the first page needs to be loaded or any other page within the data.  Your out put from the function would then be passed to the paging widgets current page and an input to the event router.  The output from the paging widget would also have to be passed to the event router.  The output from the event router would be passed to the input for your paging service.  This will tell the paging service which page to start at on mashup load and the next or previous page click event.

View solution in original post

3 REPLIES 3

Re: Pagination Navigation

Any idea on this guys?

Re: Pagination Navigation

Hello,

 

Depending on the needs of your mashup there may be other ways to solve this but one approach you could do would to be add an expression function and an event router to the mashup.

 

If you were to call this expression function taking the input or your mashup parameter it can then determine if the first page needs to be loaded or any other page within the data.  Your out put from the function would then be passed to the paging widgets current page and an input to the event router.  The output from the paging widget would also have to be passed to the event router.  The output from the event router would be passed to the input for your paging service.  This will tell the paging service which page to start at on mashup load and the next or previous page click event.

View solution in original post

Re: Pagination Navigation

Hi,
Thanks a lot for the solution.

Tags (1)
Announcements

Check out the upcoming Expert Session: Understanding ThingWorx Navigate Licensing in Community "Customer Events" section.