Discussion

1733
Views
Jon Garfunkel (JonnyGar)
BNY Mellon
Vice President, BPM CoE
BNY Mellon
US
JonnyGar Member since 2009 91 posts
BNY Mellon
Posted: February 9, 2015
Last activity: February 9, 2015
Posted: 9 Feb 2015 16:36 EST
Last activity: 9 Feb 2015 16:36 EST
Closed

Auto-refresh on control

Assume the use case of dynamically alerting the user as to alerts (as I asked I asked a few months back), or any dynamic data.

Pega, up through v6, has left this as an exercise to the users (see ugly code in thread here...)

In v7, we see that there is some clever code which drives sections to refresh based on if they are based on data (declare) pages (see docs).

Here's something easier -- what we expect OOTB is a control that generates a property which can auto-refresh itself. 

 

A plain way to do this in jQuery would be simple HTML like so: 

<span class="dynamic" id="MyOpenAssignmentCount" source="Declare_User.OpenAssignmentCount" refreshRate="60"></span>

 

Hooking the above into a jQuery function is fairly trivial -- a JS library can bind to all elements, and ask the server for the named dynamic property, load it into the SPAN field, and refresh that at the stated refreshRate. (Or use WebSockets if the server had it available).

All Pega would need do is build a control around the above.

User Experience
Moderation Team has archived post, This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Discussion, please write a new Discussion.