Announcement

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

    catch change on SelectItem

    I am using SmartGwt 3.0, SmartClient Version: 8.2/LGPL Development Only (built 2011-12-05)
    On FF11 and IE8

    I have a SelectItem with

    setMultiple(Boolean.TRUE);
    setMultipleAppearance(MultipleAppearance.PICKLIST);

    I want to add some behavior that happens when the drop down list is closed, i.e. only when the user finishes selecting the elements from the picklist, will the function be called. How can I do that?
    Thanks

    #2
    Is there any way to do this?
    Thanks

    Comment


      #3
      Try
      Code:
      SelectItem selectItem = new SelectItem();
      
      selectItem.addChangedHandler(new ChangedHandler() {
      
      		@Override
      		public void onChanged(ChangedEvent event) {
      
      			SC.say("Look, I'm doing something!"); 
      
      		}
      
      	});

      Comment


        #4
        Thanks for your reply.

        This handler gets called after every selection of element in the multiple pick list. I don't want to know every click he makes inside the pick list.

        I want to catch the close of the pick list, after the user finished to make his changes.

        Rottem

        Comment


          #5
          How would you know when the user is done ? You perhaps need to have a button which he clicks on when he is done and use the click handler of that button to do the job you desire.

          Interested to know if there is an answer to the original question though.

          Comment


            #6
            I think this is not possible.

            As far I see, you are notified every time the users selects or unselects an entry (trough the ChangedHandler()).

            I agree we could have some sort of handler to be notified when the user clicks the down arrow.

            I would try using CheckBoxItem as a workaround.

            Regards

            Comment

            Working...
            X