Announcement

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

    Whole line not selectable in combo with RestDataSource

    Hi,
    When I use a combobox which values are filled with a valuemap, I can select any item clicking anywhere in the row, but when I'm using a RestDataSource to populate the select, I can olny select an item clicking on the text. This is pretty annoying when you have short items like years where the user has to click in a corner to select a value.
    Is there something special to do when using a datasource to populate the select?

    Here is an example code:
    Code:
        isc.RestDataSource.create({
            ID: "dsExercicios",
            dataURL: "/Servicos/Exercicios/ServicoConsultaExercicios.ashx",
            dataFormat: "json",
            fields: [
                    { name: "ANO", type: "string" }
                ]
        });
    
        isc.DynamicForm.create({
            ID: 'formFiltroExercicio',
            numCols: 2,
            autoDraw: true,
            fields: [
                { name: "exercicio", title: "Exercício", editorType: "select",
                    valueField: "ANO", displayField: "ANO",
                    width: 100, optionDataSource: "dsExercicios"
                }
                , { name: "exercicio2", title: "Exercício Value Map", editorType: "select",
                    valueField: "ANO", displayField: "ANO",
                    width: 100, valueMap: { 2010: "2010", 2011: "2011" }
                }
            ]
        });

    #2
    The select is totally unaware of how the DataSource works - this issue isn't related to the DataSource, but could be related to whatever is in the actual data if you are, for example, using a bunch of HTML inside data values. We would have to see the data to tell you.

    Please don't omit all the other required details (browser, etc).

    Comment


      #3
      Hi,
      I'm seeing this behaviour in IE8, Firefox 8, and Chrome 15, I'm using SmartClient 8.1.
      The data returned by my webservice is:
      Code:
      {"response":{"data":[{"ANO":"2011"},{"ANO":"2010"}]}}

      Comment


        #4
        Sorry, this doesn't reproduce with your code (in any browser). You can verify this by adding your code to one of the helloworld files in the SDK. Let us know if you can isolate the true cause.

        Comment


          #5
          I've mad a war file that demonstrates the problem. As I couldn't attach it to this issue I've uploaded it here: http://www.megaupload.com/?d=KJ7CR9A0
          You can deploy it in tomcat and see the problem.

          Comment


            #6
            Please don't send a 13.5MB .war as a test case. Test cases should be minimal.

            This contains the same code as before - code that didn't reproduce the problem.

            Comment


              #7
              Hi,
              I'm including screenshots of what I'm seeing with IE 8, FF 8 and Chrome 15 with the two selects.
              In the 'withdatasource.png' you can see that only the four digits are highlighted, and i f you click on the right side, after the digits the item is not selected. In the 'withvaluemap.png' you can see that the whole line is highlighted and the item can be selected even clicking outside of the text.
              You don't have the same results with the sample I've sent?
              Attached Files

              Comment


                #8
                The DataSourceField type to use for text fields is "text", not "string".

                We'll consider supporting either in the future, but for now, you just need to change your dataSource field-type to "text".

                Comment


                  #9
                  We've added this support and it will be available in upcoming nightlies

                  Comment

                  Working...
                  X