cancel
Showing results for 
Search instead for 
Did you mean: 

Using View instance outside WDDoModify

Former Member
0 Kudos

Hi all

I have requirement where i need to use IWDView instance (view) outside method WDDoModify.i have gone through many threads suggesting not to do this. also Help documents suggests so.

I will Elaborate my Application structure here which will create base for my requirement.

View1

- Input Form for Web Service

- Button firing Outbound Plug connecting to View2

View2

- PDF UI Element

- Button firing Outbound plug connecting to View1

my requirement is that, i want to reset the UI elements of View2 when travelling from View2 to View1. This can be only achieved in WDDomodify view. but when i click on button firing OB plug to View1, it directly goes back to view1 and no call to WDDomodify is made.

Even if i want to invoke WDDomodify from button action handler, i will have to pass IWDView instance as parameter.

Please help me in resolving this.

Regards,

Deepak

Accepted Solutions (1)

Accepted Solutions (1)

srinivas_sistu
Active Contributor
0 Kudos

Hi,

First thing is, In WebDynPro WdDoModify() is a static method, so out side this method we cannot make any referances to this method.

If your requirement is to invalidate the context elements, then u can do that any where in View2, just you need to get the required node and invalidate that.

If your requirement is to delete/invalidate the UI Elements created in View2 while navigating back to View1 then we should have the View instance of View2. This View instance is available in WdDomodify() method and we can access that variable using a context variable. To do so, first create a context attribute of type view (I am sure about the exacat type of the variable, but u can get this) at view level (for View2) and in the DoModify method assign the value of view varaible to this context attribute. Doing this now you can access the view parameter of your View2 any where inside view2.

Hope this helps you.

Regards,

SrinivaS

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Deepak,

why it is only to delete the content in the WDdoModify?

You can write also the code in the "pluginfrom" method.

Is that not possible.

regards

Gunter

Former Member
0 Kudos

Hi ,

Create a new method and write/copy paste the same code in that.Method Name:reuseMethod()

Call/Invoke the same method in WDDoModify and also in the FireOB plug to View1.

Note:Declare the IWDView instance in the other.//global declaration inside the view

Regards,

Lavanya.G