Forum Discussion
Hi ClaudiusH,
Thanks for your response. If i wouldnt need to use an endpoint to reach the same goal, that is also fine. I dont know howto in this situation.
What i try to do (pseudo code):
<page> <filters onchange="getNewData(theme)"> <filters onchange="getNewData(state)"> <ajax data container/> <javascript> function getNewData(theme,state){ AJAXcall(url = endpoint){ <ajax data container>.setHTML(AjaxData) } } function loadOneMorePage(){ AJAXcall(url = endpoint){ <ajax data container>.addHTML(AjaxData) } } </javascript> </page> <endpoint> <assign query = [createAPIv2 CALL according to filter settings]"?url)/> <assign dataSet = rest("2.0","/search?q=" +query?url)/> <#list statusUpdates.data.items as message> <#assign rest_call = "rest_2.0:/messages/${message.id}" /> <@component id="ideas.widget.idea-message-view" message=rest_call maxWidth=max_image_width resizeCss=image_resize_css /> </#list> </endpoint>
The page loads an initial set of Ideas.
The user can adjust the set of filters to get a specific set of ideas. previously this happened by a 'pageload' and only 1 filter could be active at the time. Now we have 2 filter options: Theme and State.
What my goal is:
My idea was to make the dataset loaded with AJAX, so i can change the filters and only the datacontainer gets uploaded.
As far my knowlegde goes, with freemarker you need to use then endpoints.
Also instead of paginator, the set gets extended once the user reaches the bottom.
In short:
- being able to use multiple filters simultaneous.
- auto add next set of ideas instead the old pagination
It works now on:
https://community.ing.nl/t5/Ideeen/idb-p/idea-suggesties
The problem is that i had to 'turn off' the basic idea tile component buttons as all those links got corrupted, i would like to be able to use those aswell, ( for example the like-this-idea-button )