cancel
Showing results for 
Search instead for 
Did you mean: 

Create Footer in javascript

nandishm
Participant
0 Kudos

Hi

In one of my project i used XML for view, for controller i used JavaScript. They want to add button in footer in .js not in XML view .

So is there any view to add button in footer through JavaScript and how I set properties like visible & enable  of that button .

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

scott_stefanich
Active Participant
0 Kudos

Hello Nandish,

I created a JS Bin example in which a sap.m.Button is added to an XML view using JavaScript.

In the example, the button's text property is set using the constructor settings object. You can see the other possible constructor settings object properties in the Construction Detail section of the button's documentation. For example, the visible and enable properties are true by default, but could be set to false in the JavaScript object.

Hope this helps,

Scott

Answers (2)

Answers (2)

Qualiture
Active Contributor
0 Kudos

I think the first question you should ask yourself -- and the person who ordered it to you do do it -- is why your Button view/fragment should be written in Javascript if the rest of your view is in XML

nandishm
Participant
0 Kudos

we are using Fiori template, in Fiori  he told buttons are added in footer and header using the controller which written in javascript

nandishm
Participant
0 Kudos

Hi Robin

First understand question view is written in XML and controller is written in js,  through controller i want to add button in view. In Fiori template they do in that way only .

Thanks for you comment.

kai2015
Contributor
0 Kudos

Please close your question. Scott Stefanich has posted already the correct method. Thank you.

kai2015
Contributor
0 Kudos

Normally people ask after XML implementation but not JS implementation ...

I think JS implementation is easilier to understand.

But back to your question, I would say just read the API Reference ...

And explore the controls here: SAPUI5 SDK - Demo Kit

Also you can explore the content in this space here ...