Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Web Dynpro: several navigation links connect to one outbound plug of a view

csaba_huszar
Explorer
0 Kudos

Hi,

I have two questions in general Web Dynpro. (I have not found precise answer for the question yet)

1) What should happen in the following case?

We have three views in a component. The outbound plug of the first view is connected to the inbound plug of the second and third view via navigation links. Which view should appear, if i fire the outbound plug of the first view?

Some documentation says, this case is not allowed, some documentation says it is allowed...

2) If the previous case is allowed, what should happen in the following case?

In a child component, a window outbound plug is connected to a view inbound plug. Beside this, I implement an inbound plug of the window, where i fire this outbound plug of the window.

Now, the interface view is embedded into a parent component window. In the parrent component I connect the outbound plug of the interface component to an inbound plug of a parent view (which is also embedded into the window). I also connect an outbound plug of the parent view to the interface view inbound plug.

What will happen if I fire the parent view outbound plug? Will the parent view or child view appear?

5 REPLIES 5

Former Member
0 Kudos

Hi,

This is very much possible but under certain restrictions:

- You can connect one outbound plug to several inbound plugs of different views, not a problem with that. But at a time, only one outbound plug can be fired at a time. Like in your case, if can be somehting like.

If some condition is true.

wd_this->fire_to_secondview_plg(

).

else.

wd_this->fire_to_thirdview_plg(

).

endif.

Kindly give the sequence of your steps for the second problem, since from your description as of now its not so clear. Hope to answer that as wel.

Regards.

Ashish

0 Kudos

Hi Ashish,

For simplicity, let's talk about only the first case, maybe it will answer the second case as well.

I am not perfectly sure that i understand what you mean. I have only one outbound plug (belonging to the first view). I want to fire that one.

Only one method is available for this: wd_this->fire_plugname_plg.

As i know, the navigation link will decide which inbound plug of the other view will be used. The problem is that i have two navigation links connected to this outbound plug. Is there any rule for this case? Or maybe it is not allowed in a latter release? (Currently, i am using an old test system).

Thx,

Csaba

csaba_huszar
Explorer
0 Kudos

No more idea?

0 Kudos

I am really surprised that nobody has ever faced with this issue.

Former Member
0 Kudos

Hi Huszar,

I'm a newbie and found your question interesting. So I played a little with this issue and hope I found something to help you.

But  I wonder in why you want to use such a constellation the first place. What is your purpose? For me the idea itself doesn't make much sense... Did you by chance actually think of one of the following purposes:

  • You want two different action elements (e.g. 2 buttons) to fire different conenctions. Then you should use different outbound plugs. Connect the two buttons and the two links to different methods so that the corrsponding plug and button have the same method.

  • You want to decide by value or state which view to show. Then you should use two different outbound plugs as well and decide in the button's event handler mehtod which plug to fire , e.g.: if <condition> then <firePlugA> else <firePlugB>.

 

Generally, if you connect two views in a window via link you must chose a method to use or create a button. If you chose a method (event handler) the effect in the Java file is that the  method (onActionButtonX()) will call the corresponding firePlugOut-method.

Unfortunately in the firePlug-method itself there was no hint about the plug's destination. As I connected the same method for button and two plug targets, Web Dypro for no obvious reason always chose the same target. I did not find a possibility to directly chose the target from one outbound plug, so I guess this information is stored somewhere in the background logic.

Did I get the point or did you think of something completely different? Or maybe you just asked theoretically? In that case I don't seem to get the idea.

Kind regards,

Jana