cancel
Showing results for 
Search instead for 
Did you mean: 

Server side eventing

Former Member
0 Kudos

Hi developers,

I got the following problem in a customer's project. Analoguous to the

tutorial in the sdn about server side eventing (In the component

interface controller the event InnerEvent is fired and passes the stringparameter text to the event receivers (embedding component).) I did the

following: I created three web dynpro components. The components

EmployeeSearchComp, BonusComp and TicketComp. BonusComp and TicketComp

depend on EmployeeSearchComp and BonusComp depens on TicketComp.

Inside the BonusComp a InterfaceView from EmployeeSearchComp is

embedded. I declared a event in the EmployeeSearch Component Interface

Controller which is fired if an employee is choosen. BonusComp and

TicketComp have a event handler declared for this event. But if the

event is fired only the handler method in BonusComp is called! I am not

shure if it is a bug or not! But from my point of view both (all

registered handler methods if I correctly understand the tutorial)

handler methods should be called!? This happens when I call the

BonusApp with the Bonus Component Controller. Do somebody have an idea how

to solve it? I am not shure but I think at same time it has worked and now it does not work.

Greets Ruben

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Ruben,

I don't think it's a bug. You don't subscribe to a component event by itself but to a component USAGE event.

In your scenario, BonusComp has declared EmployeeSearchComp has a used component and can capture the events from this specific usage. If you do the same for TicketComp, it will be able to capture events from its specific usage of EmployeeSearchComp, which will be different from that of BonusComp.

But because BonusComp depends on TicketComp this problem can be easily solveed: in the event handler of BonusComp you can simply forward the events to TicketComp by declaring and calling a method exposed on TicketComp component interface.

Former Member
0 Kudos

Hi Marco,

thanks for your reply. I am not shure if I understood what you wrote.

In my case I have the EmployeeSearchComp as a used web dynpro component declared for both other using components. But for registering to the event I use the Interface Controller of the EmployeeSearchComp. The result is that one handler method is called (BonusComp) and the other not (TicketComp). I do not see the difference.

The only thing I can see is that the BonusComp is used within the application.

Greets Ruben

Former Member
0 Kudos

Hi Ruben,

Let me rephrase your scenario, to see if I got all the details.

You have an application that launch BonusComp which embed an instance of EmployeeSearchComp. You declared an event on EmployeeSearchComp component interface and then, in BonusComp, you declared an event handler.

You did the same with TicketComp, except that TicketComp is used nowhere in your application. Right?

I can see two problems:

1. TicketComp is not instantiated and so it will not be part of your runtime logic.

2. TicketComp and BonusComp use different instances of the EmployeeSearchComp so they will react only to the event of their own instance.

Ask if you need more details.

Bests

Former Member
0 Kudos

Hi Marco,

now my understanding has improved with your comments.

Thanks

Edited by: Ruben Hartenstein on Jul 11, 2008 8:00 AM