Skip to Content
avatar image
Former Member

Creating new UI5 Control with controller logic

hi

I need to create new UI5 Control that other can use via new command,my question is when I use the extend

where I should put the controller logic?

Assume that I've already control with controller logic which I want to provide out of the box when using the new control via new command....

Example will be very helpful!

~Miley

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Oct 25, 2015 at 05:44 PM

    Hi Miley,

    Check this sample: JS Bin - Collaborative JavaScript Debugging from @Dennis Seah which is an extended version of sap.m.Button. Where there is an extended property bgImg and method available for custom control as .getBgImg() by doing so you can fetch the URL of background image, also you can set a new URL using .setBgImg(). Is this what you are expecting?


    Regards,

    Sai Vellanki.

    Add comment
    10|10000 characters needed characters exceeded

    • and you have mentioned "last question" :-)

      You should not combine with new control. As I said. "nothing to do with control". It is a helper function for your controller.

      Please stop. this thread is going too long

  • Oct 25, 2015 at 06:04 PM

    Hi Miley,

    Check with dennis content. He is the master of extending new controls in SAPUI5. @Dennis Seah

    Thanks,

    Karthik A

    Add comment
    10|10000 characters needed characters exceeded