cancel
Showing results for 
Search instead for 
Did you mean: 

Dirty page detection

former_member190457
Contributor
0 Kudos

Hi developers

I have one classical feature to be implemented in WDP Java.

A page filled with model data can be edited by users and consequently saved.

I would like to actually save if and only if data has been modified.

My idea is:

upon page init, one more different model context node is populated which won't be accessed by users.

Upon save action, this context will be compared to the actual context editable by users.

If differences are detected then save is performed, else it isn't.

However, performing this check is actually hard, since Object.equals method should be overridden for every node, element and so on.

Any suggestion?

Thanks

Vincenzo

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Copy the data from "Model Node" to "Value Node" and display the data from value node. on Save, check using [isChangedByClient()|http://help.sap.com/javadocs/NW04S/current/wd/com/sap/tc/webdynpro/progmodel/api/IWDNodeElement.html#isChangedByClient()] if modified by users. If yes, you can go ahead save it.

Cheers,

~kranthi

former_member190457
Contributor
0 Kudos

Hi Kranthi, great suggestion thanks.

However, I can see that the same method is available also for model nodes

What's the point in showing the value node instead of the model node?

Vincenzo

former_member190457
Contributor
0 Kudos

Hi,

I can see that lead selection change is not detected by this function.

Is any row addition/deletion detected?

I would like to have something like

topNode.wdEquals(otherTopNode)

Alternatively I can see that the workprotect mode in EP should do the same, but in sap help it reads:

WorkProtect mode is only available for applications that run in the Web Dynpro browser client

how about using it from plain Internet Explorer user agent?

Thanks

Vincenzo