How to save value in ComboBox after refreshing the Rally Dashboard

156 views Asked by At

So my question pertains to the ComboBox value for a custom app I created.

I've got the app on my Rally Dashboard, but I noticed that for other in-house Rally apps, if I choose a particular ComboBox value to filter on and then refresh the page, the last used filter is still applied to the data.

Is there a way that I can mimic this behavior for my custom app? Currently it follows the default behavior in selecting the first value possible.

(note: I know I can use the 'value' property to set a default value but I would like to know how to make it so that it saves/responds to what the user selects even on a page reload).

Any help is greatly appreciated!

All the best, Masterme2

1

There are 1 answers

3
Kyle Morse On

As long as you're using SDK 2.0 this is totally supported. Check out the guide here on maintaining state: https://help.rallydev.com/apps/2.0/doc/#!/guide/state

Basically you just need to configure your combobox to be stateful. Here is an example making a combobox of defect priorities stateful:

this.add({
    xtype: 'rallyfieldvaluecombobox',
    model: 'Defect',
    field: 'Priority',
    stateful: true,
    stateId: this.getContext().getScopedStateId('priority')
});

The relevant properties are stateful and stateId.