cancel
Showing results for 
Search instead for 
Did you mean: 

Reloading Context Elements

Former Member
0 Kudos

I am using all non-validating action handlers, and managing user input validation myself. I have a situation where the user wants to not save the changes he or she has made and simply reload the saved data. The situation involves a tree structure, so I could always just invalidate the appopriate node to reload the data, but I'd like to avoid this b/c I'd have to reselect the current element after invalidation. I've implemented reload methods on my model objects being used, so I don't have to invalidate the node, but I've run into a problem with invalid data (such as a string in a date field). When the user enters invalid data, and does something to cause the element to be reloaded, all the valid fields are reloaded - but the fields with invalid data are not reloaded. Is there any way to drop the user input for the element (other than going through all the fields clearing out any invalid data - then calling the model object reload method)?

Thanks,

-Dave

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

David,

I guess you already know this document:

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/us... of validating and non-validating actions.pdf

But it worth to re-read this again (I trap to almost the same situation as you

The document clearly highlights that you have to <b>reset invalid context attributes on your own</b> in non-validating action handler.

VS

Former Member
0 Kudos

Yeah, the "Validating/Non-Validating" doc and I are good friends... I figured I would have to clear out the invalid data myself, but I was wondering if there was an easier way to do this than looping through and clearing the field values one by one, and then reloading them. VS, in one of your posts on one of my other threads, you asked if I was dropping user input, so this made me wonder if there was a better way...

Thanks for the help,

-Dave

Former Member
0 Kudos

The method I mentioned is deprecated now -- IWDComponent.removePendingUserInput. As per documentation:

<i>This method may be withdrawn with the first new NetWeaver release in 2006 as it is no longer needed. Context attributes simply may be overwritten in a non validating action event handler, thereby removing any pending input for them.</i>

So, according to this statement, you have to assign some valid defaults to attributes yourself.

VS

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Why cant u create a one more dummy node and map it to UI and populate it or clear it when needed...

Regards

Bharathwaj