Announcement

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

    Possible bug: pickListProperties showHeader does not hide header with pickListFields

    SmartClient V8, firefox v 3.6

    I am trying to customize a picklist for a grid editor. The effect I am trying to achieve is "optgroup". Works almost perfect, with the only problem that the picklist that I am getting cannot have its header hidden.

    To reproduce this, paste the following code in the "grids -> editing -> custom editors" example, in the fields list:

    Code:
    {
    	name: 'gdp',
    	title: 'gdp',
    	editorType: 'SelectItem',
    	editorProperties: {
    		optionDataSource: countryDS,
    		pickListFields: [{name: 'gdp'}, {name: 'continent', showIf: 'false'}],
    		pickListProperties: {showHeader: false, groupByField: 'continent', canCollapseGroup: false, groupStartOpen: 'all'}
    	}
    	
    },
    The header is hidden only if I remove the pickListFields property. However, once that is done, there's no way to select the field to show and group by (specifying the fields property in the pickListProperties field seems to do nothing (gets ignored).

    Hopefully there's something I am doing wrong and not a bug, or you can suggest a workaround so the same effect can be achieved. In any case, since it seemed like a bug, I thought I should report it.

    Thanks,
    Sorin

    #2
    Further reading shows that setting pickListHeaderHeight to zero will suppress the headers (tested to work). However, this looks like a "workaround" and not the logical solution one would consider.

    Comment


      #3
      Further digging into this shows another possible bug (using the same code above).

      The first time you open the pick list, it shows exactly as expected. Further opening the same list, but in another record will not show the groups any longer. Likely another editor is created that ignores some of the settings. Using the picklist header controls, even if I unhide the group column and tell it to group by it, the display will not change. Looks more and more like a bug. Let me know if you need any other info to reproduce it.

      Thanks
      Last edited by vina; 3 Feb 2011, 12:14.

      Comment


        #4
        Both these issues have now been resolved in mainline. Specifically:
        * showHeader, if specified on pickListProperties, will be respected
        * we will default to showing no header if there is only one visible field in the pickList
        * if groupByField is specified as part of the editorProperties for a listGrid field, when the editor is shown for multiple records, grouping should continue to be applied successfully.

        These fixes will show up in tomorrows nightly build. Please take a look and let us know if you continue to encounter problems

        Comment


          #5
          I can confirm all 3 issues are fixed.

          Thanks for such a fast feedback.

          Comment


            #6
            Unfortunately this fix introduced a JS error. Same example posted above. After you select a value, when you leave the field you get a JS error. Call stack from the developer console follows:

            Code:
            21:06:40.163:RDQ1:WARN:Log:TypeError: this.formItem is undefined
                PickListMenu._formatCellValue("BIT", {Obj}, {Obj}, 1, 0)
                ListGrid.getCellValue(record=>{Obj}, rowNum=>1, colNum=>0, gridBody=>{Obj})
                anonymous({Obj}, 1, 0, {Obj})
                GridRenderer._getCellValue({Obj}, 1, 0)
                GridRenderer.getTableHTML()
                GridRenderer.getInnerHTML(=>undef)
                Class.invokeSuper(_1=>null,  _2=>"getInnerHTML")
                Class.Super(_1=>"getInnerHTML",  _2=>{Obj})
                GridBody.getInnerHTML(undef)
                Canvas._getInnerHTML()
                Canvas._updateInnerHTML(undef, undef, undef, undef, undef, undef, undef, undef)
                Class.invokeSuper(_1=>{Obj},  _2=>"$rd",  _3=>undef,  _4=>undef,  _5=>undef,  _6=>undef)
                GridRenderer._updateInnerHTML()
                Canvas._updateHTML()
                Canvas.redraw(false, undef, undef, undef, undef, undef, undef, undef)
                Class.invokeSuper(_1=>{Obj},  _2=>"redraw",  _3=>false,  _4=>undef,  _5=>undef,  _6=>undef)
                GridRenderer.redraw(false, undef, undef, undef, undef, undef, undef, undef)
                Class.invokeSuper(_1=>null,  _2=>"redraw",  _3=>false,  _4=>undef,  _5=>undef,  _6=>undef)
                GridBody.redraw(false)
                Canvas.redrawChildren()
                Canvas._updateHTML()
                Canvas.redraw(false, undef, undef, undef, undef, undef, undef, undef)
                Class.invokeSuper(_1=>{Obj},  _2=>"redraw",  _3=>false,  _4=>undef,  _5=>undef,  _6=>undef)
                ListGrid.redraw(false)
                [c]Canvas.clearRedrawQueue()
                [c]Class.fireCallback(_1=>{Obj},  _2=>undef,  _3=>[object Array],  _4=>{Obj},  _5=>true)
                Timer._fireTimeout("$ir269")
                unnamed()
                unnamed()
            Let me know if you need any other details.

            Thanks

            Comment


              #7
              Hi,
              FYI

              I get the same javascript error on an earlier build (from 11 of Jan 2011). With me it happens in an asynchronous call to PickListMenu._formatCellValue so it might be a different scenario. But at least the location/exception is the same (formItem is undefined).

              gr. Martin

              Comment


                #8
                Hi Guys
                We've just resolved this issue in our mainline codebase as well as making a couple of other tweaks which should shore-up support for grouped pickLists.

                Please give it a try with the next nightly build and let us know if you continue to see problems

                Thanks

                Comment

                Working...
                X