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
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.
Related
I'm trying to provide swipe actions in Sencha Modern list in version 7.2.0.
Although the documentation indicates that the text, ui, iconcls and cls are bindable, I'm unable to get it to work.
Further, the text seems to be getting bound without any bind configuration which is even more surprising.
Please see relevant fiddle
Essentially, I would like to make the iconCls and the cls change based on the record's data.
Thanks
There is definitely an issue here. The text does not seem to be handled as a bind. If the text field exists it is used..... so I did a quick override that treats the ui field similarly. if it exists it is using it. You can do the same with the iconCls... etc.
Swipper override fiddle
I have multiselect component in our application, we have 2 different views of the same form.
View 1 - All the components would be editable and selectable
View 2 - Whereas in this view, user can only see the selection that he made in View1(disable all the form components). Using the below code i disabled all the form components. But the problem here with the multiselect component, even though i disabled the editing capability from the user, still i want to allow them for scrolling through the list.
this.getView().query('form displayfield,textfield,radiogroup,multiselect').forEach(function(item) {
item.setDisabled(true);
});
I tried to the disable the Selection using the listConfig property, this works. But dynamically i couldn't able to apply this property.
{
xtype:'multiselect',
fieldLabel: 'Employee Names',
valueField: 'enameCode',
displayField: 'enameValue',
listConfig : {
disableSelection: true
}
}
How can i achieve this? Please provide your valuable inputs, thanks in advance.
Thanks!
Given that disableSelection: true works for you, you should be able to achieve the same effect dynamically by calling:
YourMultiselectComponent.boundList.getSelectionModel().setLocked(true)
You should be able to call the functions disable and enable on the BoundList associated with the multiselect to achieve this dynamically.
Like follows...
Ext.ComponentQuery.query('boundlist').forEach(function(item) {
item.disable();
});
EDIT:
So I just realised that this doesn't entirely solve your problem as scrolling will still be disabled after calling the disable function. This is because ExtJS applies a mask to the entire element (including the scrollbar) that is disabled to prevent user interaction.
One thing you could do is to modify the style (width in this case) of the mask DOM element. It may not be the most elegant solution but it would fix your problem.
Ext.ComponentQuery.query('boundlist').forEach(function(boundlist) {
boundlist.disable();
var boundlistDOM = boundlist.el.dom;
var maskDOM = boundlistDOM.getElementsByClassName('x-mask')[0];
mask.style.width = "94%"; // or value so that the mask does not cover scrollbar
});
I am building an ExtJS4 Web Application and there's a part where the user is shown a "Search Panel". It's basically a floating panel with textfields and a gridView. The textfields allow the user to put his or her input for first name and last name filters. There's also a combo box that the user can use to filter the search. The results are shown in the gridView. The search functionality works well.
However, when the floating panel is hidden and then shown, the fields are reset and the user would have to enter the input once more.
What I want to happen is for the textfield and combobox values to persist even though the panel is hidden then shown again. I have tried using setVisibility(false) then using setVisibility(true) but that did not work for me.
How can I persist values of fields when their parent view is hidden/shown?
The fields should have retained the value as you are just hiding and showing the search panel. It seems there is a bug in your program, but I cannot ascertain that without seeing some code. Assuming that your search panel includes a close button, I would suggest you to use closeAction: 'hide' on the panel instead of using setVisibility(). Also make sure that you are not creating multiple instances of search panel, use a single object of search panel.
Here is a quick fiddle http://jsfiddle.net/DirtyParadoxx/gL9aekzz/
If you want to use cookies, then as Nikolay Lopin suggested, stateful: true would be a nice way of doing it.
I want to use the angularjs ui-grid and have one condition: It has to be possible to style a column filter menu.
In the documentation it is only explained how to add new items to a column menu but not how to change the design or add other controls. If we look at the example it should be possible for instance to open a column menu that can display two custom styled radio buttons (male, female) with two buttons two accept or decline the changes. If the changes are accepted, the filter should be applied.
Is it somehow possible to use templates for the column menu as it is possible for the columns header? How to create a custom column menu?
Thank you.
See plunker for solution.
Within your columnDefs you just need to add menuItems. I had trouble understanding from your question what exactly you wanted these additional dropdown options to do so I've modeled the general format for you in a very simple example where the first custom option does nothing but display in your menu and the second activates an alert containing the column name. Please let me know if this is (not) sufficient.
For a full list of supported attributes for menuItems see this tutorial.
columnDefs: [
{
field: 'name',
menuItems: [{
title: 'Custom Nothing'
}, {
title: 'Column Name',
action: function() {
alert(this.context.col.displayName);
}
}]
}
]
Came across what I think OP was looking for, definitely what I was looking for, via http://ui-grid.info/docs/#/api/ui.grid.class:GridOptions.columnDef#properties_headercellfilter
It's annoying you don't seem to be able to modify only the dropdown template, you have to override the entire header cell template, but at least you can do that on a per-col basis.
I am using cellEditing plugin to edit a particular cell in a grid. This serves my requirements really well from the UI point of view.
However, I want to add validations to the cell and prevent user from completing the edit event unless the value entered is valid. I am trying to achieve this through:
editor: {
allowBlank: false,
vtype:'customized vtype'
}
I am also implementing edit & beforeedit callback events. The error message & tooltip are shown correctly but even with an invalid value, you can still press enter and the callback method 'canceledit' is invoked. I do not want the edit event to be completed/canceled unless the value entered is valid.
However, if I use RowEditing plugin, the validation works as expected and edit event is not completed until the value entered is valid. This is what I need but the look and feel of cellEditing instead of RowEditing plugin more closely matches my requirements.
Is there a way I can have similar validation behavior in cellEditing?
I believe you should listen to validateedit editor event and do your stuff there. See validateedit in docs.