cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing values of simple type

Former Member
0 Kudos

Hi,

in my WD-App I call a business-method of an EJB which delivers a status-code. I have defined a SimpleType (lets call ist MySimpleType) which maps the status-codes to clear texts. How can I access these clear texts?

I several threads I have found this hint:

IWDAttributeInfo objAttrInfo = wdContext.node<nodeName>().getNodeInfo().getAttribute(

IPrivateMainView.I<nodeName>.<attrName>);

ISimpleType simple = objAttrInfo.getSimpleType();

Map<String, String> m = simple.getEnumerationTexts();

String clearText = m.get(<codeAsString>);

This really works fine but it implies that I need to define a context attribute of type MySimpleType. I do not want to do this, because I do not need this attribute anywhere. My EJB delivers its result in an attribute of type String, because of course the EJB does not know anything about a SimpleType defined in WD. I'd rather refer to MySimpleType by its name locally in my source. Any possibility?

Regards,

Christoph

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Perhaps you can find a solution using [the Dictionary runtime Javadocs|https://help.sap.com/javadocs/NW04S/current/dr/index.html].

Answers (0)