Auto refresh/reload widgets on the homepage

chanch
Kilo Expert

Hi,

Can anybody let me know that; how to auto refresh/reload widget (UI Page) on the homepage. My requirement is:

There are 3 widgets on a homepage and when user selects a value from first widget, SN stores the value using "PutSession" and passing this value to those 2 widgets using "GetSession". And based on the value selection the other 2 widgets should populate the data.

Right now the logic is "onChanage" of first widget value filter the data on those 2 widgets. Somehow those 2 widgets are not getting rendered and because of it is not populating data. It is only possible if I refresh the widgets. Thanks!Dashboard.JPG

1 ACCEPTED SOLUTION

chanch
Kilo Expert

Just got the solution my lead (JQuery Expert... ), we can get the class of "Refresh" Icon from the page and use click() function so that it will auto click on that "Refresh" Icon.



$j('.icon-refresh').filter('a').each(function( key, element ){ //Get Refresh icon class and click on it which will refresh each widgets
    $j(element).click();

      });



Thanks!


View solution in original post

4 REPLIES 4

chanch
Kilo Expert

I have already tried:


- location.reload(true);


- window.location.reload();


- var userImage = document.getElementById("id");


              $('#userImage').click(function() {


                      location.reload();


              });


In Client script of UI page.


shloke04
Kilo Patron

Hi Chanchal,



Refer the below link:


How to refresh a widget in service portal?



Hope this helps. Please mark the response as correct/helpful based on impact.



Regards,


Shloke


Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

Hi Shloke,



Thanks for your response, however I want to refresh it only when user selects any value from first widget "Choose customer name and event id", then only rest of the 2 widgets should get refreshed.



Link which you have shared is about "Auto refresh after 3 or 5 seconds".



Thanks!


chanch
Kilo Expert

Just got the solution my lead (JQuery Expert... ), we can get the class of "Refresh" Icon from the page and use click() function so that it will auto click on that "Refresh" Icon.



$j('.icon-refresh').filter('a').each(function( key, element ){ //Get Refresh icon class and click on it which will refresh each widgets
    $j(element).click();

      });



Thanks!