Currently the sap.m.Dialog only have the addButton method which can only add Button control, I just want to add the checkbox in the dialog footer like "Don not show this dialog again"
Update: as of commit cc55b10 (available in UI5 1.110), sap.m.Dialog comes with the new footer aggregation which awaits an instance of sap.m.Toolbar. There, you can add anything you want such as the sap.m.CheckBox.
For UI5 version lower than 1.110 (previous answer):
Adding a checkbox to the dialog footer is currently not supported as the corresponding aggregations <buttons>, <endButton>, and <beginButton> all await only sap.m.Button (or controls derived form it). I filed an enhancement request on GitHub in case you're interested.
The closest solution I could think of right now is to add ...:
sap.m.ToggleButton with the toggle text Don't Show This Again, or
sap.m.Button with the text Close And Don't Show This Again
... next to a normal close button.
Related
I have an ag-grid popup cellEditor which contains an angular mat-select control. Is there a way to prevent the popup cell editor default behavior of closing on a click outside the cell? When an item is selected the ag-grid popup cellEditor closes. I believe this is due to the click on the select drop down being interpreted as outside the cell. Is it possible to prevent popup cell closure for this case or even in all cases such that I can control it completely via code using gridApi.stopEditing()?
See https://material.angular.io/components/select/overview for information on the select control. I am not including full details here as it is likely not important.
Image of popup editor, You can see how cell is before editor is invoked as well. See where the blue number one appears
I have some data input fields inside a sap.m.table. Wanted to use Tab key to navigate to the input fields but it doesn't work.
It seems the SAP application interface hasn't implemented this feature.
I tried with some custom function and not working.
Any solution or alternative for this feature?
SAP itself now come up with the solution. Navigation with the TAB key is available form SAPUI5 version 1.44.
SAP NOTE 2387996 - SAPUI5 unable to use Tab to move to next field.
We have to press F2 key to activate this.
It's no longer necessary to use a custom solution for this. As of SAPUI5 version 1.38.0 sap.m.table has a property called 'keyboardMode' that can be set to 'Edit' which will change the tab behaviour to navigate focus through all editable fields in the table.
This mode is suitable if the number of items is limited and if there
are editable fields within the item.
While the last/first interactive element within an item has the focus,
pressing tab/shift+tab moves the focus to the next/previous element in
the tab chain after/before the item .
https://sapui5.hana.ondemand.com/#/api/sap.m.ListKeyboardMode
Attach browser event
new sap.m.Input({
value:"{first}"
}).attachBrowserEvent("keydown",function(oEvent){
if(oEvent.key == 'Tab'){
alert(this);//this reference to input control
//Your logic here
}
})
Sample JSBIN
can I somehow set in what order the text fields become active after pressing the "Tab" button?
I think it depends on when you added the field and not where it is in the form. So can I change this or I should add the fields in the order I want to switch them with the "Tab" button?
Thanks!
There are at least a couple of ways to change tab order.
With the form in design view, right click on an area of the form without a control. On the context menu that appears, click on Tab Order. A dialog will open that will allow you to change the tab order.
Another method is via the property sheet for each control. On the Other tab there is a property for Tab Order. Just set it to whatever you like.
In my GWT app I have a radio button group of choices. The last choice is to add a new item. What I want is that the words "create new xyz" to disappear, and to be replaced with a text box to take the input. What is the best way to do this? I have thought about using a disclosure panel, but that seems unnatural and I don't have it working properly yet.
Is it possible to write an onClickHandler for that radio button? If so, then inside that onClickHandler, add code to generate the textbox.
I have a menu drop down action in the coolbar. It has 3 sub items that form a radio group. I would like to change the icon shown in the coolbar when the user selects one of these options.
I've googled and seen that I should look at:
org.eclipse.ui.commands.ICommandService.refreshElements(String, Map)
and
org.eclipse.ui.commands.IElementUpdater
Its probably the right thing to look at exception its not enough information. One or two small code snippets will be excellent.
Thanks in advance.
Ok basically if you don't want to use a "custom" control the what to do it is to have your handler (handler that is linked to the specific command) implement IElementUpdater. When every the toolbar item gets shown or clicked on (i.e if the user selects on the the radio buttons) the method: updateElement(UIElement element, Map parameters) gets called.
The element has a setIcon() method and this is what i used to change the icon of the menu drop down action.
Every update to the Coolbar points to the specialization of the WorkbenchWindowControlContribution class.
This bug 186800 has some code example in it which can be of interest.