cancel
Showing results for 
Search instead for 
Did you mean: 

Create a Browser-Refresh Request

Former Member
0 Kudos

Hi,

do you know an opportunity, to generate a Browser-Refresh (Like the F5-Button)?

I have a TimedTrigger. And after x Seconds the Browser should refresh. How can I do that?

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

No. There is following problem. Our Intranet has a Timeout of 45 minutes. After 40 Minutes popups a little window with an advice, that the session ends in 5 minutes. But after this 5 and accordingly 45 minutes the user cannot close this window because the webdynpro-application is cancelled as a result of the timeout. So I want to create a automatically Refresh after this 5 minutes, because the user will see automatically the login-page of the intranet.

There is a similar solution with javascript: "location.reload(true)"

But I need someting for java or webdynpro

Edited by: stefan1983 on Mar 30, 2011 1:10 PM

Qualiture
Active Contributor
0 Kudos

Hi Stefan,

I'm afraid if you want to execute code after the expiration, it won't work because of this very expiration...

I would execute the refresh code just before expiration.

With regards to your requirement, I could recommend two possible solutions:

1) embed a 1x1pixel IWDIFrame in your Web Dynpro application, which loads a simple HTML/JSP file containing the javascript refresh for the parent frame, i.e. parent.reload(true);

2) you could develop javascript functions using the Suspend and Resume plugs; see http://help.sap.com/saphelp_nw70ehp1core/helpdata/en/68/3aee42c4257176e10000000a1550b0/frameset.htm

Former Member
0 Kudos

What do you mean with "the subsequent call to wdDoModifyView()"? Can you give me a code example?

This is my onAction-Method:

public void onActionTimeOut(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
  {
    //@@begin onActionTimeOut(ServerEvent)
	
    //@@end
  }

And this is my empty wdDoModifyView (The TimedTrigger is included in a little Popup-View without any logic):

public static void wdDoModifyView(IPrivateTimeOutPopupView wdThis, IPrivateTimeOutPopupView.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
  {
    //@@begin wdDoModifyView
    //@@end
  }

Edited by: stefan1983 on Mar 30, 2011 11:58 AM

Qualiture
Active Contributor
0 Kudos

Hi Stefan,

I meant, when your action is triggered, a call to wdDoModifyView will be made as a result, which in essence updates the view of your application.

Although your code seems ok, apparently this isn't your desired result.

Do you need to go to the initial state of your application instead?

Qualiture
Active Contributor
0 Kudos

Hi,

Why not simply trigger an action after your timer has expired?

The action itself doesn't have to do anything, but the subsequent call to wdDoModifyView() will re-render your application.