on 09-07-2005 2:16 PM
Hello,
so I created a simple data type "LogLevels", entered some enumeration values and I generated a class representation:
public class LogLevels
{
private String name = "";
private LogLevels(String name) {this.name = name;}
private static final HashMap enum = new HashMap();
...
static { // fill enum ... }
...
}
Sure I can simply link the simple data type to a list box, which is nice, but how do I access the list (enum) from a model class? I was expecting a generated method something like this:
public HashMap theCollection() {
return enum;
}
I guess there must be some other way to access the list from a model class - anyone mind telling me how?
Thanks in advance,
Troy Holly
hello guys,
i am new to webdynpro, can anybody tell how to initialize "Enum" com.sap.mw.jco.util class.
i used
Enum ACTION {select,delete,udpdate};
and it showing error. " expected "{" , "," , "," expected "??
please help me,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Troy,
This is a limitation of current WD generator: it does not expose neither values (as <b>final public static <EnumType></b> constants) nor collection of values.
Sure, it would be great if generated class looks like WDVisibility or any other standard WD enumeration type.
However, currently the only workaround is access enum value like <EnumType>.valueOf(<enum-key-you-typed-in-editor>); Obviously, it is better to encapsulate this functionality in separate class.
Valery Silaev
EPAM Systems
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.