Announcement

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

    setViewState behavior changed?

    I'm trying to use the 10/15 nightly build of SmartGWT and I'm finding that I get an error when using setViewState():
    Code:
    17:01:25.250:XRP2:WARN:Log:Cannot change configuration property 'viewState' to ({
        selected:"[]", 
        field:"[{name:\"Field_Name\",autoFitWidth:false,width:null}]", 
        sort:"({fieldName:\"Field_Name\",sortDir:\"ascending\",sortSpecifiers:[{property:\"Field_Name\",direction:\"ascending\",$78e:null}]})", 
        hilite:null, 
        group:""
    }) now that component ComponentID has been created.
    Looking through the javadoc, it seems that the behavior of setViewState has changed:
    Code:
    setViewState
    
    public void setViewState(java.lang.String viewState)
                      throws java.lang.IllegalStateException
    Initial view state for the grid.
    Since view state contains field state it is not necessary to set fieldState when also setting viewState. If both are provided, fieldState has priority for field state. 
    
    If this method is called after the component has been drawn/initialized: Reset this grid's view state to match the ListGridViewState object passed in.
    Used to restore previous state retrieved from the grid by a call to ListGrid.getViewState.
    
    Parameters:
    viewState - Object describing the desired view state for the grid. Default value is null
    Throws:
    java.lang.IllegalStateException - this property cannot be changed after the component has been created
    whereas in previous version of the javadoc there is no such exception when changing this property after the component has been created:
    Code:
    setViewState
    
    public void setViewState(java.lang.String viewState)
    Reset this grid's view state to match the ListGridViewState object passed in.
    Used to restore previous state retrieved from the grid by a call to ListGrid.getViewState.
    Parameters:
    viewState - Object describing the desired view state for the grid. See ListGridViewState
    See Also:
    getViewState()
    My application relies on setViewState() ( and setFieldState() ) after the components have been created. Can this functionality be restored?

    #2
    Feature has been restored and will be in tomorrow's nightly build (2013-10-16).

    Comment

    Working...
    X