Skip to Content
author's profile photo Former Member
Former Member

Obtaining a reference to EJBs building the WD Model

Hi All,

does anybody know how can I easily obtain a references to the EJBs that build the WebDynpro model. For example when I select something in some tree automatically the context element is selected but I want to call some method of the EJB that is associated to this context element.

Any ideas?


Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Dec 12, 2003 at 05:53 PM

    Hi Metodi,

    You get the original EJB that is bound to the model node as follows: get the model node, from the node a concrete element, and then the API on the element provides the method modelObject() that returns the EJB instance bound to the element.


    You have an EJBb of type MyEjb, a model node in your context with name "MyEjbModel", and you have bound an instance of MyEjb to the node. Then you can get the model class instance as follows:

    MyEjb ejb = wdContext.nodeMyEjbModel().currentContextElement().modelObject();

    Best regards,


    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.