Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Problem using 2 simultaneously checked checkboxes

    Hello,

    I have a problem using two simultaneously checked CheckboxItems: after checking checkbox A, when I check checkbox B it quickly goes back to being unchecked. If I check checkbox B again it seems to work fine. The function getValueAsBoolean() from checkbox B returns false after this... This seems to happen with any of the two checkboxes I check last.
    Here's a relevant code snippet:

    Code:
    // Both comboboxes are checked
    if( checkBoxA.getValueAsBoolean() ){ // returns true
    	variable++;
    }
    if( checkboxB.getValueAsBoolean() ){    // returns false
    	variable++;
    }
    I'm using SmartGWT 2.4, GWT 2.3 and Firefox 3.6.

    Thanks in advance!

    #2
    Here i use
    checkbox.getValue().equals(new Boolean(true)) and I don't have any kind of problem.

    Try using that, and if the problem persist, report a BUG

    Comment


      #3
      I found out I had a "copy/paste" mistake and had added the same checkbox twice... No surprise one of them returned null all the time. jmichelgarcia thanks a lot for your reply, checkbox.getValueAsBoolean() as well as your solution work just fine.

      Comment

      Working...
      X