function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Lokeswara ReddyLokeswara Reddy 

Showing status in VF popup window

Hi,

Problem description: On click of a button on Opportunity, a request goes to third party (SOAP API), couple of fields will get updated based on the response,
When the user click on the button, a popup window will open which auto refreshes every five seconds till we gets the response and render new button, when clicked on this button it redirects to the third paty. the requiement is to show some progress till the button gets visible. I have used actionfunction feature but it is not working for me.
Any help is much appreciated.

Regards
Lokesh
Best Answer chosen by Lokeswara Reddy
Lokeswara ReddyLokeswara Reddy

Thanks Amit,

This logic was already seen and can not be implemented directly because of transaction time out in my requriement, I have used work around to show the status bar, the rquest has to wait till the third party updates few fileds in SFDC and it has to redirecteto third party site on successful response back from third party, the request can not wait for more than 10 seconds or else it would show time out exception on the VF page. I used two date variables one for the current time and the other to hold currentTime + 9 sec. 
I used while loop and checking SFDC for the values on each second, if the values are updated then hide the status bar, and populate a button, on click which redirects to thirdparty.

Anyways thanks for your inputs.

All Answers

RAJ TRRAJ TR
Use <apex:actionstatus> and upload some static resource like loading indicator. then block the screen till you get response and once you get response show the button
Lokeswara ReddyLokeswara Reddy
I'm already using actionstatus, can you please explain me how to block the screen? please post sample code for better understanding.
Thanks in advance.
Lokeswara ReddyLokeswara Reddy
@Amit Thanks for the response,
But, as I mentioned earlier, i'm done with popup window and looking for help in showing up status bar/progress bar in it till we get response from third party.
 
Amit Chaudhary 8Amit Chaudhary 8
Hi lokesware,
You can check block UI CSS in above code.

Even you can try below code for loading image
http://amitsalesforce.blogspot.in/2015/02/progress-barloading-image-on_11.html
 
Lokeswara ReddyLokeswara Reddy

Thanks Amit,

This logic was already seen and can not be implemented directly because of transaction time out in my requriement, I have used work around to show the status bar, the rquest has to wait till the third party updates few fileds in SFDC and it has to redirecteto third party site on successful response back from third party, the request can not wait for more than 10 seconds or else it would show time out exception on the VF page. I used two date variables one for the current time and the other to hold currentTime + 9 sec. 
I used while loop and checking SFDC for the values on each second, if the values are updated then hide the status bar, and populate a button, on click which redirects to thirdparty.

Anyways thanks for your inputs.
This was selected as the best answer