cancel
Showing results for 
Search instead for 
Did you mean: 

Can we run an event on iView load

Former Member
0 Kudos

Hi friends,

I have a requirement, where I need to fire an event after a WD Java iVIew loads. Basically, I need to simulate a tab click after the iVIew has finished loading. How can I track the iVIew onload event and how do i call it? We are running NW 07 Portal.

Any help is greatly appreciated.

Thanks a lot

Preet

Accepted Solutions (1)

Accepted Solutions (1)

pravesh_verma
Active Contributor
0 Kudos

Hi Preet,

There is no way You get find the onLoad Event in webDynpro, Just for your information after each event or refresh wdDomodify is called. So you can write a function and call that function as the last statement of the wdDoModify(), which means that you are calling a function which is after loading the complete view.

Your second requirment regarding triggering and event. You cannnot directly trigger an event however you have to do it otherway round. Define a method in component controller and call that method of the contoller from the view. Create an event handler in the view whose event you want to trigger. Provide the function of the contoller as handler function to this event handler.

Write whatever code you want to writein this event handler.

I hope this will provide you some useful inputs... Please revert back in case you need any further inputs!

Thanks and Regards

Pravesh

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Pravesh,

Thanks a lot for your valuable input. Now, this raises another question. Here is what I need to do. In 1 WD application, I have 2 WD Components FC Component and VC Component. In the VC Component, I have a view VCview. Is there a way for me to call a method in VCview from FC Component?

I know it will not be straight forward, but I have no other option.

Appreciate your help.

Thanks

Preet

pravesh_verma
Active Contributor
0 Kudos

Hi Preet,

Yes that is possible. You have to use the concept of Used Component. Whenever you define Component as used Component then you can access the method os that component in the Parent component (i.e.: Using component).

That means that you have 2 Component:

FC Component and VC Component. Make the VC component as used component and add that to the FC component.

See this blog in which the complete way of handling this case scenario is explained:

/people/sudhir.gorantla4/blog/2008/02/27/componentization-of-webdynpro-application-in-ce71

Apart from this: there are lot of other threads in which same discussion has happened please have a look to all these:

1)

2)

3)

I hope this solves your issue. Please close the thread if the issue is resolved or kindly revert back in case you need any further input.

Thanks and Regards

Pravesh

Former Member
0 Kudos

Hi,

I have 2 WD Components FC Component and VC Component. In the VC Component, I have a view VCview. Is there a way for me to call a method in VCview from FC Component?

What you have to do to acheive this is make this method part of your component controller and expose it through interface controller.

As usual create public part

Used this component and call the method.

Regards

Ayyapparaj

Former Member
0 Kudos

Check this SDN article on 'Communication Between One Component to Another Component using Web Dynpro' :

https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/60132577-7801-2b10-c9b1-b13b2f78...