on 12-09-2010 8:15 AM
As per requirement it is a parent child relation, i have simple type object saying country and lanaguage.I need to get the Language text in string array object .can anyone help in this .
<< Moderator message - Everyone's problem is important. Please do not ask for help quickly. >>
.As i am very new to Webdynporo java.Thanks in advance.
Edited by: Rob Burbank on Dec 9, 2010 10:53 AM
Hi,
In dat case do this activity inside a loop like for loop. Try out something like below -
String[] lang=wdContext.currentContextElement().getVa_lang();
for (int i = 0; i < lang.length; i++) {
language<i> = lang -
give i inside 3rd brace here after lang
}
hope it helps.
Regards,
Sen
Edited by: prodyut kumar sen on Dec 10, 2010 1:40 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can try like below -
String[] lang = wdContext.currentContextElement().getLanguage() where language is your context name.
Regards,
Sen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello sen,
See iam puttng my really picture here .I have value attribute va_lang which type is com.language.language
and i have va_country which type is com.country.country .
If i write code like this
String lang[]=wdContext.currentContextElement().getVa_lang(); Its showing error like
its saying that we can not convert from string to string[];
Please help me out ...
IWDAttributeInfo attInfo = wdContext.getNodeInfo().getAttribute("va_lang");
ISimpleValueSet valueset = attInfo.getSimpleType().getSVServices().getValues();
wdComponentAPI.getMessageManager().reportSuccess("ValueSet :"+valueset.toString());
This valuse set contains all key values .
But now i need these to be in one String[] object.
http://help.sap.com/javadocs/NW04S/SPS09/dr/com/sap/typeservices/ISimpleValueSet.html
IWDAttributeInfo attInfo = wdContext.getNodeInfo().getAttribute("va_lang");
ISimpleValueSet valueset = attInfo.getSimpleType().getSVServices().getValues();
String[] texts = (String[]) valueset.texts(locale).toArray( new String[0] );
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.