cancel
Showing results for 
Search instead for 
Did you mean: 

retriving valus from context

Former Member
0 Kudos

Hi,

I have node Country under that I have attribute Name which contains which contains sevaral country nemes at runtime. can any one help me to retrive all the company names assigned to the attribute Name.

if i say wdContext.currentCountryElemt().getName () , i will get only selcted one , but i need all the list.

Regards,

Venki

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

You can do that by using a for loop like

for(int i=0;i<wdContext.nodeCountry().size();i++)

{

String name=wdContext.nodeCountry().getCountryelementAt(i).getName()

}

Regards

Raghu

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

To retreive all values from the context Country as mentioned by you use the following code



 for(int x=0; x<wdContext.nodeCountry().size(); s++)
	  {
		  ICountryElement element = wdContext.nodeCountry().getCountryElementAt(x);
		  String name = element.getName();
                                  //TODO: Use the name for further processing.
	  }

Regards

Ayyapparaj

Former Member
0 Kudos

Hi,

Try This Code For getting Countrey Names Dynamically.

for(int i=0; i< wdContext.nodeCountry().size();i++)

{

String countryNames = wdContext.nodeCountry().getCountryElementAt(i).getCountryNmaes();

}

Regards

SubbaRao Chinta

Former Member
0 Kudos

Hi,

if you use the table ui it will displays all the countries with out any coding.

assign the country to table ui dataSource property and bind the name to cell editor.

to get the all countries through code do like this,

for(int i=0;i<wdContext.nodeCountry().size();i++){

wdComponentAPI.getMessageManager().reportSuccess("Country Name:"+wdContext.nodeCountryElementAt(i).getName());

}

Regards,

ramesh

former_member192434
Active Contributor
0 Kudos

Hi Venki,

Use this code

for(int i=0; i<wdContext.nodeCountry().size(); i++)

{

wdContext.currentCountryElemt().getName

}

Thanks