Announcement

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

    MultiComboBoxItem "Enter Values" Message

    How can I change the "Enter Values" Message in a MultiComboBoxItem? Changing the hint doesn't change the message.

    http://www.smartclient.com/smartgwt/showcase/#multicombobox_category_new

    Using SmartGWT 3.1p.

    #2
    Still haven't found how to change the message. Anyone?

    Comment


      #3
      Originally posted by edulid View Post
      Still haven't found how to change the message. Anyone?
      May be my experience will help.
      I'm trying SmartClient(not SmartGWT), but think, that you can do the same.
      I've played some time with JS debugger and figured out that it use comboBoxDefaults property.
      So I just copy values to create multicomboitembox section of my script something like this:

      name:"units",
      showTitle:false,
      optionDataSource:"measureOptions",
      editorType:"MultiComboBoxItem",
      comboBoxDefaults:{
      "hint":"my_hint",
      showTitle:false,
      showHintInField: true,
      completeOnTab:true,
      width:"*",
      shouldSaveValue:false,
      editorType:"ComboBoxItem"
      }

      and it works for me.

      Comment


        #4
        Still nothing. Isomorphic?

        Using smartgwt 4.0 power.

        Comment


          #5
          It's the hint on the ComboBox AutoChild. You can either change it per-instance or system-wide - see the AutoChild overview in the docs for details.

          Comment


            #6
            I would like to do it system-wide. So I wrote:

            final Label properties = new Label("new text");
            MultiComboBoxItem.changeAutoChildDefaults("hint", properties)

            But nothing happens.
            What am I doing wrong?

            Comment


              #7
              Set comboBoxItem.hint on the "comboBox" AutoChild.

              There is no AutoChild named "hint".

              Comment


                #8
                Thanks, that was the problem.

                Where can you read which AutoChilds are available for each item? In the AutoChildUsage docs there is the AutoChild "header", here you mentioned the AutoChild "comboBox",... but where can you find a list of the AutoChilds of each item?

                Comment


                  #9
                  They're labelled right in the docs - search for "AutoChild" on any given component's page.

                  Comment


                    #10
                    I tried following:

                    MultiComboBoxItem.changeAutoChildDefaults("comboBox", new Label(""));
                    MultiComboBoxItem.changeAutoChildDefaults("hint", new Label(""));
                    MultiComboBoxItem.changeAutoChildDefaults("comboBoxItem.hint", new Label(""));

                    ComboBoxItem.changeAutoChildDefaults("comboBox", new Label(""));
                    ComboBoxItem.changeAutoChildDefaults("hint", new Label(""));
                    ComboBoxItem.changeAutoChildDefaults("comboBoxItem.hint", new Label(""));

                    nothing out of the 6 worked.

                    How can i get rid/change the default "Enter values" message?

                    Comment


                      #11
                      The "comboBox" autoChild of MultiComboBox is a ComboBox instance, not a label or similar.
                      So - you want to create a template ComboBox and call setHint on that.
                      Then you want to use changeAutoChildDefaults() to apply this template to the "comboBox" autoChild of multiComboBox.

                      Comment

                      Working...
                      X