cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with 'eventing example application'

Former Member
0 Kudos

Hi

I tried to implement the example i found on SAP help with subject 'Using Server-Side eventing in WEB Dynpro'

The example doesn't work correctly in an sense that the first time the application is started the form 'Internal Web Dynpro Component' is already visible and after using the 'Create Component' button the application fails.

As far as i can understand i followed all the instructions.

Does anyone know what i did wrong?

regards

Bertil

Accepted Solutions (0)

Answers (2)

Answers (2)

BeGanz
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hallo Bertil,

in the turorial section 'Implementing the View Composition - Defining Component Usage' there is a step where the Lifecycle of the component instance related to the declared component usage is set as 'manual'. I assume that you did keep the default 'framework controled'. In this case an exception is thrown when programmatically trying to create a component instance for a component usage, because hasActiveComponent()==true. So createComponent() does not exit silently like destroyComponent() for an already destroyed component instance.

See the JavaDoc for IWDComponentUsage:

<b>createComponent</b>

public void createComponent()

Creates a component instance for this component usage. The type defined by the component usage declared at design time is used for creating the component instance. The method fails if the Component Usage is associated to a Component Interface Definition.

Precondition:

hasActiveComponent() == false && isReferencing() == false

Parameters:

componentName - The fully qualified name of the Component Implementation to use

Former Member
0 Kudos

Hi Bertram,

Thanks very much!

This was indeed causing the problem.

Bertil

Former Member
0 Kudos

Bertil,

You will have to set the default property of the interface view in the embedder app's window to FALSE. This should set things right.

Regards

Shakeel