|
Quick tip: trigger partial update from client side javascript
In one app I wanted to have a panel to be updated automatically in 30 minute intervals.
You can run a javascript function in intervals with "window.setInterval()". That's the easy part. But how to trigger a partial update to a panel/div from client javascript? As always with XPages, it's a piece of cake once you know it: you can use XSP.partialRefreshPost(id) with the runtime id of that control to trigger the partial update. You can even submit a piece of data with that function which you can get in the beforeRenderResponse event with something like: Client side: XSP.setSubmitValue(q); XSP.partialRefreshPost(panelid); Server side: var map = facesContext.getExternalContext().getRequestParameterMap(); var values = map.get('$$xspsubmitvalue'); Thanks to Rocky Oliver, he pointed me to that technique in his session at Entwicklercamp 2010.
Comments (0) | Permanent Link
Links: YouAtNotes Software | Worklow-Engine for Lotus Notes and Web | All-in-one web-based support solution | XPages knowledge collection wiki German links: YouAtNotes Startseite | CRM Software für Lotus Notes | Prozessmanagement / Workflow Software | OpenSource Web-CMS |


