cancel
Showing results for 
Search instead for 
Did you mean: 

Dropdownbyindex onSelect + Refresh other data..

Former Member
0 Kudos

Hello Friends,

I have a popup which should takes the user address data so I have inputfeilds like name1, name1 city street land ( all plain inputfields) things works fine so far as I ´was reading values as follows:

wdContext.nodeAddress().currentAddressElement().getName1() ... etc

Now user wants instead of plain inputfield for Land, he want to have dropdownList ( so far things fine )

I replace the inputfield for land and make it to dropdownbyindex ( as user wants on select the name of the coutry should display I created a new event and onSelect I dispaly the name of the courty of selected countryKey like for DE, Germany) and from here problems starts...

When user selects the countrykey, event onSelect is fired and all other inputfield data is refresed ??

I tried later in this event... to set the values again of name1 etc which user has entered earlier, but did not worked...

address node has 1:1 car and 1:1 selection

And idea...

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

ok problem solved, there was a kind of refresh ...invalidate...

Regards,

Former Member
0 Kudos

Try using dropdownbykey instead of dropdownbyindex

I think you are using value attributes of the same node for all UI elements inlcuding dropdownbyindex. This might be causing the problem..not sure though

Former Member
0 Kudos

what I did is commented all code in my event onSelect() for dropdownbyindex and even though the inputfeild values are refreshed....

dont know why it refresh the other day, any suggestions for me ?

Former Member
0 Kudos

To which attributes of the node you have bound the InputField and DropdownbyIndex elements..

If you are binding from the same node,the data will be refreshed.

Say,, you have node as follows

Address

--> country

--->city

You have bound country to DropdownbyIndex to country and city to InputField of the same node then the node will be automatically refreshed as they are linked to the same node.

Probabably you create a different node for country or create city outside of Address node..

Hope it helps.

You can also use DropdownbyKey to populate the countries

Former Member
0 Kudos

Hello ,

Thanks for your reply,

I have two differnet node one is Address and other is countryName

Address has following

...name1

...name2

...

land

CountryName is bound to my dropdownbyindex... so my idea was when user selects one values... i will set this values in OnSelect method to address-land... but even I dont write single line of code in my onSelect() the data of the inputfields is refreshed...

Please note this is a popup window....

Dont know what I can do actually the other idea of OnSelct method was to display the name of the country as in dropdown I can only display like DE and onselct i will retrive the name of country and display as TextView...

Other question is it possible in dropdown to display like two columns one containing country code other containing country name and when one selects its, the values should be set as courtrykey.. ?