Announcement

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

    Question about Combobox select item values

    Hi,
    We recently noticed that, certain values in the combobox item is blowing up. The closest I can reproduce is here in the show case.
    https://smartclient.com/smartgwt/sho...bobox_category

    from the show case add the bellow values using the other option,
    • if I add a value as <template>, the combobox is showing empty list.
    • Click image for larger version

Name:	combobox-1.png
Views:	19
Size:	7.2 KB
ID:	277687
    • Add value as <abc> or some other value, The value is showing as empty.
    • Click image for larger version

Name:	combobox-2.png
Views:	18
Size:	10.3 KB
ID:	277688
    Can you please verify and let us know if it can be fixed by the code or in the new build.

    Thanks

    #2
    <abc> is HTML, and <template> is also an internal HTML element that doesn't render and would indeed hide subsequent content in the absence of a closing </template>.

    The way to show those values is to escape them, with escapeHTML - however, while this works on SelectItems, there was an internal restriction that prevented it from working on ComboBoxItems.

    We've made a change and you can retest with tomorrow's build.

    Comment


      #3
      Thank you for the quick response. Is it fixed in today's build?
      The show case is still showing the same.

      Thanks

      Comment


        #4
        Yes it is.

        What do you mean that the Showcase is showing the same? The showcase doesn't use anything like <template> in any pickers.

        Comment


          #5
          Hi,
          If I add the <template> or <abc>, as specified in post#1, it still behaving the same. So the fix is to show the html elements ?

          Thanks

          Comment


            #6
            You can't make code changes in the SGWT showcase, so this must be some other local code that you have - note that, in the SmartClient (javascript) showcase, you *can* make changes to samples, and SGWT is generated from SmartClient; most misbehaviours in SGWT would be reproduced in SmartClient.

            As we noted, if you want to escape HTML in the picker values, you need to set escapeHTML on the item.

            Also note for the future - it's important to let us know your environment, framework release/date, browser, etc, when you post, and to be exact about how you're reproducing issues. If it isn't clearly reproducible, we need a runnable test-case in order to investigate.
            Last edited by Isomorphic; 1 Jul 2026, 08:00.

            Comment


              #7
              Thank you for the quick response. Sorry I thought it will be fixed in show case too. I will test in my local and update you.

              Thanks

              Comment


                #8
                Following up, there's a little confusion here - you posted in the SmartClient forum but linked to a SmartGWT sample, and you can't edit the SmartGWT samples.

                If you're actually testing in the SmartClient Showcase, you can try out the fix by going here and sticking this code in the "variousControls" tab:

                Code:
                isc.DynamicForm.create({
                    ID: "df",
                    fields : [
                        {
                            name: "combo1", title: "Object valueMap", editorType: "ComboBoxItem", escapeHTML: true,
                            valueMap : { "abc" : "<abc>", "template" : "<template>", "other" : "Other" }
                        },
                        {
                            name: "combo2", title: "Array valueMap", editorType: "ComboBoxItem", escapeHTML: true,
                            valueMap : [ "<abc>", "<template>", "Other" ]
                        },
                    ]
                });
                Last edited by Isomorphic; 1 Jul 2026, 08:21.

                Comment


                  #9
                  I am able to test using the link provided and it looks good now.
                  Appreciate your quick response and support.

                  We can close this now.

                  Thanks

                  Comment

                  Working...
                  X