Skip to Content
author's profile photo Former Member
Former Member

Call method after control init

HI

I've this following control,I ,know that the init method is the first method to call but my question is if there is a way that

after the init other method will be called with params from the init(maybe to keep them as global),but not from the init itself ?

I mean that Ui5 control framwork call to init and then renderer etc I want to add additional method call after the init somehow

JS Bin - Collaborative JavaScript Debugging

Yep I know that this is very advanced!

Thanks,

Stephane

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Nov 18, 2015 at 08:43 PM

    after init and after render?

    default implementation is empty, just redefine it and you should be fine

    UIComponent.prototype.onAfterRendering = function() {};

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 18, 2015 at 08:36 PM

    hi Stephane

    onBeforeRendering is called before render

    JS Bin - Collaborative JavaScript Debugging

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 18, 2015 at 08:09 PM

    have you tried afterRender function? why not within init itself calling a function outside of the controller that may be accesible from everywhere else - as per your requirement

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.