Aug 23, 2017, 8:31 AM
68 Posts

combobox/listbox resets itself every time the document is placed in edit mode or saved!

  • Category: Debugging
  • Platform: Windows
  • Release: 8.5.3
  • Role: Developer
  • Tags:
  • Replies: 0

I've been working with xPages for a long time, but this problem is new to me!  I have an xPage with many fields, including several combobox fields.  But ONE of the combobox fields is misbehaving.  The values in the combobox are a @DbColumn lookup to a view in the same database.  The values are Normal, High, and Immediate (it's a priority field).  The default on the form is "Normal".  We can change the value from Normal to another value, save and close the xPage and the value saves correctly.  But every time we re-open that document with an xPage and put it into Edit mode (with a button that changes the Document Mode to Edit), the value switches back to "Normal".  I've removed the default value on the form (there is no input validation), and that didn't help.  I changed the values from a lookup to static values, and that DOES work, but I prefer to do a lookup, so the list can stay configurable..

I inherited this database, so I'm not completely familiar with it.  I have to set disableValidators = true for the combobox, to prevent validation errors.  But I've also checked the validation code, and even turned it off.

Why would a combobox field reset to the first value in the list by just putting the xPage in edit mode (or saving it)???


Update:  When I delete the field from the form, then delete the field(s) that are bound to that field, recreate the field on the form, then recreate the combobox field, it appears to behave.  Apparently a single field on a form can get hosed up!