Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Reflection of context node elements

Hi,

we have a problem with reflection on context node elements of the type IWDNodeElement. We cannot get all methods via the IWDNodeElement.getClass().getMethods() function.

Following example:

In the context we have:

Context

User (Node)

userName (Attribute)

userPassword (Attribute)

We create a new node element of that type that we want to fill by reflection.

IPrivateUserView.IUserElement element = wdContext.nodeUser().createUserElement();
wdContext.nodeUser().addElement(element);

Then in another funtion we try to fill the userName and userPassword fields by getting the setter methods of the IUserElement:

Method[] methods = element.getClass().getMethods();

And that were the problem occurs! The methods that are given back are just the methods of the IWDNodeElement class but not of the IUserElement class.

Maybe it's because this IUserElement class is a generated (by webdynpro) static inner class of an interface and reflection can not handle this?

Any hints would be nice

Fabian

Former Member

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question