cancel
Showing results for 
Search instead for 
Did you mean: 

How can I remove an OVS extension from a context attribute?

J_R
Advisor
Advisor
0 Kudos

In our Web Dynpro application we provide a generic search mask to the user. The information about the search fields like labels, length etc. is retrieved from the backend during runtime. Also, the information if there should be a value help available or not is read from the backend during runtime. In case there should be a value help for a search field we just add an OVS extension, using method WDValueServices.addOVSExtension(...). For this, we pass the AttributeInfo of all relevant context attributes to this method.

The problem is now the following: The user can switch between different kinds of search masks. Because of the generic implementation all use the same Web Dynpro context. So it might be that the search field #1 on the first input mask has a value help whereas search field #2 on the second input mask doesn't. But if we once have added an OVS extension to the context attribute of search field #1 it can apparently never be removed anymore. At least I couldn't find a method to remove it.

Accepted Solutions (0)

Answers (2)

Answers (2)

BeGanz
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hallo Jens,

the WDValueServices-API will be adapted to this need in NetWeaver 04 - Support Package 11.

Greetings, Bertram

Former Member
0 Kudos

Hi Jens,

I'm not sure, but you can try the following:

1. use wdContext.reset(false) -- probably it drops OVS extensions.

2. if [1] doesn't work, then create search attribute(s) dynamically, then do wdContext.reset(false) and re-create search attribute(s) from scratch

VS

J_R
Advisor
Advisor
0 Kudos

At least your second proposal would work for sure if I had only static context nodes apart from the dynmic OVS context. But in my case I can not use wdContext.reset(false) since I have dynamic context nodes in my controller that would get lost. And unfortunately, there is no method available to reset a specific context node only instead of the whole context.

I contacted the responsible Web Dynpro developers in the mean time and they offered to implement an API in SP11 to remove the OVS.

Former Member
0 Kudos

Hi Jens,

if it is possible for you cascade controllers.

So ctrl2 uses ctrl1. Where ctrl1 holds all the dynamic node stuff. In ctrl2 you dynamically map these nodes plus add the OVS stuff. AFAIK if you reset() the Context in ctrl2 only the local nodes (OVS ones) will be reset.

Best regards,

Christian

J_R
Advisor
Advisor
0 Kudos

Hello Christian,

this could work. I guess I would have to remap the dynamic nodes in ctrl2 after wdContext.reset().

But this approach would require a major re-design of my application and is not a fine solution. In my opinion the problem is simply a lack of the current API that must be resolved by the Web Dynpro developers.

Best regards,

Jens

Former Member
0 Kudos

Hello Jens,

yes, you have to remap them again as they'll also get lost.

I've heard some time ago from a developer/consultant that there will be a removeAttribute, resp. removeChild in some future release of IWDNodeInfo. Hopefully it'll come soon.

Best regards,

Christian