Skip to Content

Create Footer in javascript

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Jan 13, 2015 at 01:38 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 13, 2015 at 02:10 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 13, 2015 at 12:05 PM

    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 ...

    Add comment
    10|10000 characters needed characters exceeded