cancel
Showing results for 
Search instead for 
Did you mean: 

Getting the view Instance in User Defined Methods

Former Member
0 Kudos

Dear Friends,

Is it possible to find the current view instance other than by using wdDoModifyView? We can create an attribute of type IWDView and assign the wdDoModifyView's view parameter as its value and we can use it across our application. Is there any other way to find the current view instance other than this?

Accepted Solutions (1)

Accepted Solutions (1)

junwu
Active Contributor
0 Kudos

why u want this?

Former Member
0 Kudos

Thanks for the reply Jun Wu.

I am trying to code for getting the values in UI elements based on the ids of the respective UI elements in another component. The logic I write uses view instance. I am looking at other possibilities of getting view instance other than the one we get in the wdDoModifyView.

junwu
Active Contributor
0 Kudos

i don't think it is the proper way. you should try with the context

Former Member
0 Kudos

Hi Jun Wu,

In context we can hold the value. The value (view instance) - where I can get it apart from wdDoModifyView?

junwu
Active Contributor
0 Kudos

I was saying you can get the user input for a ui element from the context, not asking you to store the view in the context.it is not a proper way.

Former Member
0 Kudos

Hi Jun Wu,

I am getting the user input from the context only. Suppose for example if I write an export program which exports the data entered by the user, the data may vary across multiple user sessions. What I need to do is to get the view instance of the particular session to access data entered by the particular user right? That view instance I will get from doModifyView. I am using that view instance to write my code now. My question is - is it possible to get the view instance in any other way apart from using the view instance in the doModifyView?

junwu
Active Contributor
0 Kudos

i didn't get ur scenario,

what is "the data may vary across multiple user sessions"

junwu
Active Contributor
0 Kudos

anyway,  trying to get value from  view instance is wrong. no need to do like that. value are in the context, why you need the view?

Former Member
0 Kudos

Hi Jun Wu,

Leave out the scenario. My question is whether it is possible to get the view instance from any other way other than getting it from wdDoModifyView?

junwu
Active Contributor
0 Kudos

no other way.

Former Member
0 Kudos

Thanks very much Jun Wu.

Answers (0)