Quick tip: trigger partial update from client side javascript
Julian Buss, March 18th, 2010 09:31:21
Tags:  XPages 
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

Comments:
No Comments Found
 Add a comment
Subject:
   
Name:
Mail:
Web:
 
Comment:  (No HTML - URLs with leading http://)
 
remember me?   
About this site
I am a Lotus Notes developer, consultant and one of the founders of YouAtNotes, a german software vendor specialized in Lotus Notes software for CRM, Workflow and Web solutions.
I write about IBM Lotus software and other stuff which I come across. Have a nice time here!

Search
RSS-Feeds
rssfeed.pngContent Feed
rssfeed.pngComment Feed
Recent posts
Recent comments
Links to YouAtNotes
Links to YouAtNotes (in german)
Archive
Impressum / Datenschutz
(german)