cancel
Showing results for 
Search instead for 
Did you mean: 

Reset DropDown to previously selected value

Former Member
0 Kudos

Hi,

I'm looking for a proper solution for the following problem:

I have added a drop down in my application for selecting a company. A detail area shows data dependent on the selected company. The user can edit the displayed detail data and can change the company by selecting a different value set entry of the drop down.

When the user enters an invalid date for example and tries to change the company, the internal WD validation aborts navigation and displays an error but unfortunately the drop down is updated despite of the error. So the user gets the impression that the displayed detail data belongs to the company displayed in the drop down.

Any ideas for a good solution?

I'd be grateful!

Regards,

Marc

Accepted Solutions (0)

Answers (1)

Answers (1)

venkatakalyan_karanam
Active Contributor
0 Kudos

Hi

When ever user enters invalid data show the dropdown value to "Please select one" like that .

First of all let me know what you need to display when user enters wrong dependent data. if its Previous drop down value then capture it in a temp variable and set this value every time users data is right refresh that value.

Regards

Kalyan

Former Member
0 Kudos

Hi,

the problem is, that I don't really have an appropriate event handler method where I still have access to the previously set value. Therefore I can't reset it. Up to now the only reasonably good solution is in my opinion to use a calculated attribute which is linked to the displayed detail data and will therefore be reset in the getter if the lead selection of the detail data context node isn't changed due to validation errors. The downside of this approach is that getter/setter methods are called multiple times for each record, so there should not be much business logic inside. But maybe there is a better solution. So let me know if you know one!

Regards,

Marc