cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the unsaved state in a web dynpro application

Former Member
0 Kudos

How do I get the workprotect APIs dirty flag in a web dynpro application? Is there an event I can subscribe to?

I want a mechanism to know if the data on a Web Dynpro screen changed since it loaded.

Thanks

Sid

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

You can use the workprotect API's.. Refer this link

http://help.sap.com/saphelp_nw04/helpdata/en/17/76d93f130f9115e10000000a155106/frameset.htm

Well here you can use these API's in any of the hook methods. For instance on loading of the WebDynpro Component in the wdDoInit() method if you say something like

WDPortalWorkProtectMode.setApplicationDirty(true);

Then you cannot navigate away from this WebDynpro iView in the Portal until you say

WDPortalWorkProtectMode.setApplicationDirty(false);

But anyway the above link would help you acheive it. But ensure that in the Portal WorkProtect Mode setting you choose the kind of setting that you need.

regards

Ravi

SidBhattacharya
Product and Topic Expert
Product and Topic Expert
0 Kudos

What I want to know is how can i know that I have to do a

WDPortalWorkProtectMode.setApplicationDirty(true);

in my web dynpro app!