How to Create Tabgroup on smartface app studio - smartface.io

I have tried to create a tab-view or tab-group like control on smartface.io but I can't find any solution on the website.
Please any one have idea on how to create tab group. I can't find any tab-view on their the view pallet of IDE. thanks

You can use textbuttons, place them at the top of the page, use as many as you need. And place container objects under these buttons. When you press a button, make the related container's visibility true and other's false. For example, when pressed button1, let
cont1.visible = true;
cont2.visible = false;
cont3.visible = false;
and so on.
Also you should check Smartface in Action project. You can find project in Welcome page, for example in pgListView.

Related

Protractor right click open in a new tab wrong menu proposed

I have a problem when I do the test of a right click with Protractor.
The element where I right click is a link ''
However when the test is run in chromeDriver the tab that appears is not a tab that offers the possibility of opening in a new tab.
It should rather be this
In protractor I use the following code:
let link = element(by.css('.ag-body-container div[colid="test"] a'));
await browser.actions().mouseMove(link).perform();
await browser.actions().click(protractor.Button.RIGHT).perform();
await browser.actions().mouseMove(link).keyDown(protractor.Key.CONTROL).click().perform();
await browser.actions().mouseMove(link).keyDown(protractor.Key.CONTROL).click().keyUp(protractor.Key.CONTROL).perform();
If you have a solution to this problem
I know that this problem has already been posed but without solution provided
No right click - open in new tab
I assume you have a Single Page App or some similar setup and you are executing the nav clicks with javascript, but you want them to also behave like links.
If so, wrap your navigation item in an a tag linking to the link, and prevent executing the link on left click with js
function navClick(event){
alert("click action");
return false;
}
<button>Link</button>
Hope this helps!

Can I change "OK" button style in Select Dialog to emphasized?

anyone know if sapui5 provide solution/function to change button style in select dialog? I've checked the SAPUI5 sdk but there is none for this solution.
If you are OK with using "private" properties then you can use _oOkButton property of SelectDialog or else you can use _getOkButton function which also is kind of "private" and returns ok button instance.
Just use the instance of the Select Dialog and get all buttons using the following methods. Select Dialog is a dialog only, you can use the methods of sap.m.Dialog
Let say you have the instance of the dialog as oSlectDialog then
oSlectDialog.getButtons() - will return all the Buttons in the footer. You can use loop them and give custom class accordingly.
var oBtns = oSlectDialog.getButtons()
for(var b in oBtns) {
var oBtn = oBtns[b];//You can check for button instance, if you want to add custom class differently.
oBtn.addStyleClass("YourCustomClass");
}
You can also use the sap.m.Dialog methods like oSlectDialog.getBeginButton(), oSlectDialog.getEndButton().
Since UI5 1.62.0, the primary action OK (later renamed to Select) is automatically emphasized if the theme is sap_fiori_3.
https://openui5.hana.ondemand.com/#/entity/sap.m.SelectDialog/sample/sap.m.sample.SelectDialog
If it's not urgent, I'd suggest to avoid relying on private methods/ properties, but update to the latest UI5 version and themes.
Update: and since 1.70 (commit:1f421b0), the button is automatically emphasized in other supported themes too, such as sap_belize, sap_belize_plus
Related Github issue: https://github.com/SAP/openui5/issues/2254

Customizing properties dialog screen in IBM Content Navigator

I need to develop a functionality in IBM Content Navigator where after search for an item, right click it-> Properties, I need to either:
1 - add a button in properties dialog screen that will call a service and open another dialog;
2 - or extend the Save button functionality to also call a service and open another dialog;
What's quickest way to achieve that ?
Have a look # ecm.widget.dialog.EditPropertiesDialog and onSave() method. This might help you to extend save button functionality.
You can add your customized code by using aspect before/after:
(choose either depending on your functionality)
aspect.after(ecm.widget.dialog.EditPropertiesDialog.prototype,"onSave", function(event){
......
});
aspect.before(ecm.widget.dialog.EditPropertiesDialog.prototype,"onSave", function(event){
......
});

Change menus and menu items programmatically in Eclipse E4

I am having trouble removing existing menus from the model, in a running app.
For example:
MMenu menu = modelService.findElements(app, "idMenuFoo", MMenu.class,
Collections.<String>emptyList(), EModelService.IN_MAIN_MENU).get(0);
menu.setLabel("X");
menu.setVisible(false);
menu.setToBeRendered(false);
After this code gets executed:
The label has been changed to 'X'
But the menu entry is still visible/rendered
If I start the app without clearPersistedState, then restart it, the menu has disappeared. This leads me to be believe the the visibility and rendering attributes were set in the first place, but not applied to the model (unlike the label attribute).
How can I programmatically trigger a main menu bar "refresh" after such changes?
As a Greg in the comment above posted, there is an open bug filed to address this issue. An easy to implement a workaround involves manually refreshing the underlying SWT menu. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=365724#c9 for details. In a gist:
// retrieve the main menu, containing the top-level menu element that needs to be refreshed
MMenu mainMenu = ...
// org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer
MenuManagerRender renderer = (MenuManagerRenderer)mainMenu.getRenderer();
renderer.getManager(mainMenu).update(true);

Property additionalActions of NSUserNotification seems not working?

To understand NSUserNotification better, I wrote a little test app playing with this class.
So far so good, except that no matter how hard I tried to feed the additionalActions property with array of NSUserNotificationAction objects, it never showed any difference but only one action button and a close one.
My expectation for this property is that the notification would show a pull-down menu containing the additional buttons I offer as it does in the Mac App Store update notifications.
Am I missing something? Or are you having the same problem, since it is a bug awaiting Apple to tackle?
Can you please try to click and hold down the action button in your notification? Does it show a drop-down menu of additionalActions?
Update
As it turns out, you can show the little chevron next to the action button by setting a true value for the private _alwaysShowAlternateActionMenu key on the notification. In Swift 3, it would look like this:
notification.setValue(true, forKey: "_alwaysShowAlternateActionMenu")
However, as I mentioned this is a private API and I strongly advise against using it if you want to distribute your App through the Mac App Store.
It is probably a bug. Setting up additionalActions will create the list, but not the little arrow icon. Holding down on actionButton will show the menu with the number of actions you set.
Besides setting additionalActions will cause several other problems. I will save this for another question.
Refer to another question.
show NSUserNotification additionalActions on click
P.S. I am using El Capitan APIs