EasyUI Forum
May 10, 2024, 04:11:23 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Form Load and ComboBox OnChange / OnSelect....  (Read 4985 times)
2plus2
Jr. Member
**
Posts: 75


View Profile
« on: May 27, 2019, 04:26:16 PM »

Howdy...

(I'm still in conversion 1.3.x to 1.8.x hell.)

We have a fairly complex form load that updates a cascade of combo boxes, it works as intended until the form's onLoadSuccess event is completed. Something is resetting all the combo boxes after the form load and onLoadSuccess is completed.

I've been unable to track down what is calling the combo box and resetting the values.

I'm pretty sure it's not the previous cascade activating again, since break points don't active within that method when the combo boxes reset.

I've played with switching between onChange and onSelect but that doesn't seem to affect the issue, but I may have balled it all up with my code changes.

Any ideas to assist, or keys to stopping this from happening.
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: May 27, 2019, 07:18:48 PM »

In 1.3.x, calling 'setValue' method only trigger the 'onChange' event. In 1.8.x, calling 'setValue' method may trigger the 'onSelect' and 'onUnselect' events before the 'onChange' event. If your issue continues, please show some code snippets to demonstrate your issue.
Logged
2plus2
Jr. Member
**
Posts: 75


View Profile
« Reply #2 on: May 28, 2019, 04:51:11 AM »

Unfortunately all this code is on an intranet / behind a firewall, and not accessible and I'm not sure I can get a snipet working well enough to demo the issue.

I'll cut out what I can and display it here this evening.

I tried a solution provided in the forum that was supposed to disable / enable the onSelect event but that didn't appear to work. It was an older solution provided for v1.3 I think.

So just to be clear, by calling the load method for the Form we, under the covers, call the setValue method for every form element?
Logged
2plus2
Jr. Member
**
Posts: 75


View Profile
« Reply #3 on: May 28, 2019, 07:00:08 PM »

I decided to implement a tracking variable for the form load method and trap for that on the comb box onBeforeLoad method. Lazy I know, but quickest path to fix that's not fragile.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!