cancel
Showing results for 
Search instead for 
Did you mean: 

Calling a View in Used Component

Former Member
0 Kudos

Hi,

I want to call View2 when user clicks a button on View1. Screen should refresh and show View2 when user clicks the button on View1.

View1 is in Component1 from View2 is in Component2.

Did the following

1) Declared Component2 Usage In Component1.

2) Declared an event in the Interface Controller of Component2

3) Declared usage of Interface Controller of Component2 in the View1 of Component1

4) Raised an event from the Interface Controller of Component2 based on an action in View1

Now based on this event I want to load View2 in Component2. The View2 is Interface View of Component2 visible in Component1.

a) My question is where should I declare a Event Handler for Subscribing the event raised in Component1?

b) Even after subscribing to this event, how do I load View2

(I don't want to define a navigation link from View1 to Interface View(View2) at design time, due to design constraints)

I think I need to call the default plug of Interface View (View2) but how?

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

Well you can create a External Interface View.

In addition to the steps you have done ie.

1) Declared Component2 Usage In Component1.

2) Declared usage of Interface Controller of Component2 in the View1 of Component1.

3.Define a used webdynpro component of component2 in component1

After you have defined the component 2 in component1 go to the Window Navigation modeler in component1.

One of the options while you embed a view is

"Embed external interface view. " (this is used for linking views from other components using plugs)

You will get a window for selecting the Window interface view of component2. When you select that and say ok you would get the view2 of component2 in the diagram view with a inbound plug.

Now create a outbound plug in Component1 View1 and then link this to the component2 view2 inbound plug.

Now you can fire the plug on some action when required. That should do the trick.

Hope that helps you.

regards

Ravi

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks You Ravi

Former Member
0 Kudos

Thanks Ravi. Yes I can do that by defining a navigation link at design time from View1 to the Interface View of Component2.

But I want to navigate by raising and subscribing to events.. Like when event is raised in Component1 , View 2 that subscribes to this even should automatically be invoked and loaded.

I dont know if this is even possible in WD. That is navigation whichout defining the navigation link at design time. Just checking..

Thanks and Points awarded

Former Member
0 Kudos

Hi

You can do that. But view2 will open up as a popup window. With plugs i am not 100% sure but 99% it is not possible.

regards

Ravi