Topic
No replies
SystemAdmin
SystemAdmin
7615 Posts
ACCEPTED ANSWER

Pinned topic Bug | Defaulting select boxes before page load throws multiple alerts

‏2012-04-22T12:25:40Z |
I think most of us might have observed this behavior. When you default the value of a single select control before the coach loads, it will throw multiple alert messages during page load.

I dug in further and noticed that Lombardi adds a method selectValue() after the SELECT control which will initialize the default value. This selectValue function resides inside coach_designer.js and has an uncommented alert statement which is the actual culprit.

Steps to reproduce:
1. Create a Human service and a Single Select Control (a.k.a Combo Box/Drop Down) to the coach.
2. Hard Code few values in the presentation section such as R - Red, B - Blue, G - Green
3. Now add a String variable under the Variables section and default its value to G
4. Bind this String variable to the Single Select control and run the coach.

You will notice that 4 alert messages will come: SELECT, R, B, G.

Steps to fix:
Just comment the alert thing directly in the coach_designer.js file. This file lives here:
Version 7.2 WLE:

<Install_Dir>/IBM\Lombardi7\AppServer\profiles\Lombardi\installedApps\LombardiCell01\teamworks.ear\teamworks.war\script\coach_designer.js


Look for alerts in functions selectValue and selectOptionValue and remove/comment them. A server restart might be necessary post that. I tested this in 7.5.1 and it works well. No alerts found.