Custom Pagination in endpoint links to "unknownpage"
Hey,
I developed a custom components including a custom pagination like this: http://community.lithium.com/t5/Developers-Discussion/Implement-custom-pagination/m-p/106695/highlight/true#M3927
Everything works pretty well if I use only one of my components per page. But for my use case I want to use three different custom components, all with their own custom pagination, on one page (Displayed in the same area, but selected through a custom tab component).
This causes some issues, because all components use the same pagination. To solve this, I had the idea to change all my custom components to endpoints and call them via AJAX from my tabbing component.
But now my pagination is broken. All links (page 2, page 3, and so) refer to an URL like "../unknownpage/page/2..".
I think this issue is caused by the specific behavior of endpoints.
Does anyone got some experience with similar problems and get some hints how to resolve them?
Thanks and regards,
Christian
If you use the page URL to embed the page number, you'll need to use a different parameter name for each component. You could do this with a simple prefix.
For example, the URL for you page might be:
However, this starts to look very messy, and you have to persist all the parameters when changing page for just one component.
A better approach is to use JavaScript inside the component to call the REST API (or a custom endpoint if appropriate) and update the HTML content of the component. The next/previous links will need to execute a JavaScript function to get the next/previous page of data and update the content.