Hide go button SAPUi5 - sapui5

Good Morning,
I an starting working with SAPUI5.
I want to hide a go button of a FilterBar (sap.ui.comp.filterbar.FilterBar)
I can use the method "hideGoButton()"?
How can I use it?
Thank you!

There is a property on the FilterBar control called showGoOnFB.
<fb:FilterBar xmlns:fb="sap.ui.comp.filterbar" showGoOnFB="false">
If you want to hide the Go button dynamically or by using some sort of toggle event, like I assume you want to do based on your mention of hideGoButton() above, you can use an event handler similar to the one in the UI5 Explored sample:
FilterBar samples
Check the code for sample 2. There is a function in there to hide the 'Filter' selector.

Related

How to go to another view when a button is pressed?

I have Worklist view that contains a button. That button need to go to another view. How can I accomplish this?
Assuming you have your routes and targets set up in manifest.json you'll want to do somehing like this in your press event handler for the button.
this.getRouter().getTargets().display([TARGET NAME FROM MANIFEST]);
OR
this.getRouter().navTo("NAME OF ROUTE FROM MANIFEST");
Again like others have said this is highly dependent on use case, this is a general idea of what your solution may look like.

How to make sap.m.Text focusable?

Simple problem in fact.
I am displaying some Text using sap.m or sap.ui.commons elements.
I cannot access any of them using the arrows (cursors).
I succeed navigating to input fields, rows in table but not Text.
I looked for any help on the net but without success.
if i grasp the question right, then the desire is to have a click event for sap.m.Text. I.e. a click on a sap.m.Text control triggers a event which leads to a method in the corresponding controller of the view in which the control sits.
sap.m.Text does not feature any click event by standard. instead please use sap.m.Link. sap.m.Link has the press event which is a click event. e.g. in a xml view:
...
<Link
text="clickMe"
press="onClickMethod">
</Link>
...

How to find a image button using SWTBot

I have a SWT Button, it does not contains text, just an image. I searched for methods, but I can't find a way to press it.
If you know the index -0-based order of the button in all the available buttons in this context- of the button, you can try bot.button(index). But as UI can change that, I strongly recommend the solution proposed by #alt3.
Instantiate the button with an id:
yourButton.setData("org.eclipse.swtbot.widget.key", "yourButtonId");
Then, call the following method through the bot:
bot.buttonWithId("yourButtonId").click();

How to make a combobox in iphone

I am trying to make a combobox in ios following this link http://www.codeproject.com/KB/iPhone/iphonecombobox.aspx.
But the click event (that shows the picker) seems to work sometimes and sometimes not. It looks like sometimes it just works in some regions of the control and not others.
Any idea of what is wrong?
It's kind of hacky, but you can add a hidden UIControl around the region of the ComboBox and then wire it up to the same IBAction or void that the existing ComboBox uses. For example, -(IBAction) showPicker could be the action of a new UIControl that you add right around the region.
For some reason, the answer was using the textfield and image directly to the page instead of creating a view for the control and using that view N times.
I created a combobox api for iOS, hope this could be of any help: http://www.chupamobile.com/products/details/365/ZComboBox/

Programatically change icon for a eclipse RCP command

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.