Quantcast
Channel: SCN : All Content - SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 6178

UI5 - Enable Button on XML View

$
0
0

Hi All,

 

I have an XMLview in which I have a button on it, which is disabled. Defined using the following code: -

 

<Button id="rejectButton" enabled="false" text="Delete" type="Reject"

                        icon="sap-icon://delete" press="onDelete" />

 

The app is a split view. This button appears on the detail view. Now, I want to be able to click an entry in the master view and in turn enable this button.

 

I am failing miserably. I presume I may need to get hold of the button ID and somehow set the enabled to true. I am thinking I need to be using the sap.ui.getCore() thingy, but do not know how to specify an ID.


Could someone point me in the right direction of how to get the button element, so that I can enable it. Or if this is the wrong solution, tell me how I should be enabling it.

 

Thanks

 

Martin


Viewing all articles
Browse latest Browse all 6178

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>