Skip to Content
avatar image
Former Member

Accessing values of simple type

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Feb 25, 2008 at 09:19 AM

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

    Add comment
    10|10000 characters needed characters exceeded