SAPUI5 - Sap.m.RadioButton Value Field? - sapui5

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

Related

PowerApps Get Selected Item from Lookup to make a Button Visible at the Command line bar

I want a button from the command line bar to be visible or invisible depending on whether a record has been selected in the lookup field from the main form or not.
If no record has been selected, then the button should be displayed. Otherwise not.
For this problem, I want to use the Power Fx in PowerApps, but I haven't found a command yet, which shows me the content or something like that of the lookup field. Other field data types like text have worked without problems.
With Javascript, I already managed it without problems, but I would like to do it also in PowerFx if that should work.
Screenshot: https://i.stack.imgur.com/uqDJ6.png
The records come from the Table Company, where the attribute is Companyname.
Commands where I think they might work:
If([Selected Record];true;false);If(IsBlank([Selected Record]);true;false);If(IsBlankOrError([Selected Record]);true;false);If(IsEmpty([Selected Record]);true;false)
I guess there are 2 scenarios:
The Lookup form control element is a Dropdown with a Selected output property. Then your approach would work like If(IsBlankOrError(DataCardValue1.Selected),true,false)
If your form control element is a ComboBox then you could use If(CountRows(DataCardValue1.SelectedItems)>0,true,false) or the above described IsBlankOrError.

UIPickerView custom title

I have an array that I use to populate my pickerView, a simple string array. The issue is that I need the first item to be something like "Choose team".
The only way I have achieved that is the add the first item in the array to be "Choose team", but this messes up the array structure for me and I wonder if there is another way of doing this.
So, can I add a default value to a UIPickerValue, if no: how would you have solved this issue?
There is no easy way to add a default value. You can duplicate the array and add the string to the duplicated version for display but then you have to be careful about indexing issues. If the array's value changes programmatically, it can be a disaster. This duplication thing is not a good design anyway.
Alternatively, you can add a fixed label on right side of each picker values. Here is the example
Fixed labels in the selection bar of a UIPickerView

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

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

EXTJS 4.2 - changing the key in Property Editor

I am using EXTJS 4.2.1 and we have a requirement wherein the user should have an ability to edit the 'Key' in the Property Editor. Is there a way to do this?
In this case you should just use an editable grid with 2 columns and hide the headers. The property grid is solely for modifying the value column.

How to set up binding for an array with Gwittir and GWT?

I have an list of checkboxes on a GWT widget using Gwittir. I want to bind these checkbox values in my view to some values in my Model so that I can tell which ones are selected. How can I set up a binding to do this?
For a single value (one not in an array), I've been doing this:
Binding binding = new Binding();
binding.getChildren().add(
new Binding(viewObj.getTextBox(),"value",modelObj,"textValue"));
But I don't know how to transition this to work for an array of items. Please help.
I ended up not using Gwittir for those parts which dealt with arrays of data. Instead I manually transferred the data from my view to my controller when the user clicked a button which would record the state of all the checkboxes in an array to an array of values in the controller.