cancel
Showing results for 
Search instead for 
Did you mean: 

how to pre-populate dropdown list for edit purpose (w/o writing code)

Former Member
0 Kudos

Hi experts,

In my application, I have an edit page to allow users edit existing data. Some of the data are presented as dropdowns. Right now, I am using a data source to build a dropdown and I have to iterate thru the list to find the matched for the existing value and set it to be "selected".

My question is, is there any way that I can set it up at design time so that WD knows which value should be selected after the whole list is built, without writing code. It becomes messy when you have several dropdowns you need to pre-selected on the same edit page.

Thanks,

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Nitin,

Thanks for your reply. Other Java frameworks (like Strut, Spring), and .NET have built-in capability to do this. I just don't want to write code every time when I try to display an existing selection in the dropdown.

Thanks,

Robert

Former Member
0 Kudos

Can you give an example how this can be done in some of the mentioned frameworks and which code you claim has to be written in WD? I still don't get it.

Armin

Former Member
0 Kudos

Hi Robert,

Not possible. - At design time, you do not know the value set & also the chosen value as it can be anything.

As you say ' The user had already selected some value ' - implies you have no knowledge at design time.

Hope I am clear.

Kind Regards,

Nitin

Former Member
0 Kudos

Armin,

say if I have a context node to build my dropdown, e.g. month of the year. My user had selected "July" as the answer but now she wants to change it to "April". In the edit page, I need to present her with the dropdown AND it should have the month "July" selected.

Is there anyway to achieve this without writing code. Of course I can programmatically find out the index for "July" and set it as selected.

Did I make myself clearer?

Former Member
0 Kudos

I'm sorry I still don't understand your question.

Armin

Former Member
0 Kudos

I don't understand your question.

Armin