Not able to set value for Ext.ux.form.MultiSelect in ExtJs 3.4 - extjs3

I am using ExtJs 3.4.
When i set value to Ext.ux.form.MultiSelect, I am getting this error.
"Uncaught TypeError: Cannot read property 'clearSelections' of undefined in MultiSelect.js:245".
If I have to clear the selected values in "Ext.ux.form.MultiSelect" before setting the selected values, then how can i do that.
Please give suggestions for this.

If you mean this component, then in setValue method there is call to this.view.clearSelections(), and that probably causes issues. view is created in onRender method. So your combo is probably not rendered when you call setValue.
I see 3 solutions:
Ensure combo is rendered when you call setValue
Check is combo is rendered; call setValue when it is, assign value when it isn't
Override MultiSelect and fix it

Related

SmartTable How to use setIgnoredFields method

I'm trying to update a SmartTable to disable column rendering and table personalization for selected columns using the setIgnoredFields method from the API.
However, after accessing the control instance and using the above method, following error is displayed in the console:
Property ignoredFields cannot be changed after the SmartTable with id "idListReport" is initialised.
How do we access the SmartTable control instance (before it's initialization?) and use this method so that certain columns can be hidden in table display and personalization?
(Tried this in the onBeforeRendering method in the view - however, the control seems to be already initialized by then.)
Do you need to set it dynamically?
If not, please use
<smartTable:SmartTable id="idListReport" ignoredFields="a, b, c"
I have used setIgnoredFields method in View Initialization instead of onBeforeRendering and it worked.
If you want to use dynamically then use this in init method sap.ui.getCore().byId("#tableid").setIgnoredFields("property1,property2,...");

Null Values in Checkbox Custom Fields

I'm noticing that editing a matter from the web interface and adding a checkbox custom field to the matter does not automatically set that checkbox to 'false.' Instead, unless you set the box to true, save it, and then re-edit it to uncheck that box, you cannot get a subsequent api call to return a 'false' value.
It strikes me that this ought to be corrected?
This is Matt G. from Clio's API support team.
You're correct that checkbox custom fields don't return a false value unless thy're actually toggled on and then off. Until some value is set, the checkbox field won't have any information stored in it and will return a null value.
We'll evaluate the functionality and look into updating how checkboxes work. In the meantime, if you want to get records of all Matters with an unchecked checkbox, you can look for Custom Field Values that are false and null.

SAPUI5 - Sap.m.RadioButton Value Field?

sap.m.RadioButton has got only Text attribute and does not have a Value attribute.
While I can work around this by using custom data, is there anything I am missing? sap.ui.commons.RadioButton has got a key field.
Also, what is good way to bind a value to a Radio Button Group(with sap.m.Radiobutton controls) in XML View
The "selected" property of sap.m.RadioButton is what you are looking for. Documentation

GWT DataTable TextInputCell is not showing the correct value

I have a DataGrid with a TextInputCell column, using a ListDataProvider. When the value in a cell is changed I am creating a RequestContext and calling RequestContext#edit with the original entity for the row that is being edited. I then set the field in the mutable version of the proxy to the value from the edited cell. This all works nicely, and I can save the change successfully to the database. However, on the server I modify the value before saving the change, and send the modified entity (DTO) back to the client. In the Receiver#onSuccess method I store the new entity in the list data provider, and then call ListDataProvider#refresh. But the value that is shown in the DataGrid doesn't change to reflect the modification on the server. I've looked at the value that is supplied to the TextInputCell#getValue method, and it is correct, that is, it is the value that contains the modification applied on the server.
I tried creating another column in the grid that is just a TextCell, and supplied the same value in getValue for that cell; in this case the displayed value is correctly updated by the refresh, reflecting the modified value that was returned from the server.
So, my question is: where does the cell get its value? When I look at the value returned by my TextInputCell#getValue method it appears to be the correct value, but that value is not being shown on the screen (the value shown on the screen is the value that was in the proxy object prior to sending the request to the server).
Note: I looked at this question, but it did not work in my situation.
I have a very similar problem.
I have a page showing a grid with two column: the first one has check boxes instead of text.
The value of the check box is given by:
public Boolean getValue(Item item) {
return selectedItems.contains(item);
}
When the user checks a check box, I store the value in a map (selectedItems).
At the bottom of the page there is a "Clear" button that reset the map and calls the table redraw, but the status of the check boxes does not revert to the original status (i.e. the check boxes stay selected).
Debugging the code I've found that getValue() returns the correct value, but is like the table caches the cells.
The only workaround I have found, without rebuilding the whole table, was to remove the check boxes' cell and add it again on "Clear".
itemsTable.removeColumn(0);
itemsTable.insertColumn(0, makeSelectionColumn());
The method makeSelectionColumn() must return a new cell.

wicket: Dropdownchoice

i have two dropdowns using same model and sets the value into it. Dropdown1 will visible on screen always and Dropdown2, will be visible for only one particular option choosen in Dropdown1. and i am making an query to the DB based on the selections in dropdowns.
But when i have both the dropdown first and then hide the second one, The value already set but the Dropdown2 is still avalible in my model, and making my query to fetch improper data.
So can any one suggest me an idea, how to set the value to null for the attribute which is actually set but dropdown2, if dropdown2 is inVisible.
(i tried to set the ModelObject to null, when making the dropdown2 invisible (using AjaxFormComponentupdateBehavior), but when i make the dropdown2, visible again, it returns null,even if i make any selection in it)
Are you using a LoadableDetachableModel ? try to explicitly detach model from that dropdown on setHide event. I did not try it though.