IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Disabling the initialization of imported views

    Posted Mon June 11, 2018 08:09 AM

    Hello everyone,
    I have an issue with my application which has an impact on the performance. I hope you can help me in this topic.

    So, what do I have:
    I have a view A which imports another View B. This import shall be done if a boolean in View A is set true. In Order to achieve this I filled the ‘Rendered’ property with that boolean.

    But I am still observing that the View B is initialized everytime I call View A, even if not needed (boolean set false).

    I also tried to wrap the import with an if-construct and set the ‘Value’ property to that boolean but I am still not obtaining the behavior I want.

    Is there any way to implement this behavior?

    Thanks for you help.


    #webMethods-BPMS
    #MWS-CAF-Task-Engine
    #webMethods


  • 2.  RE: Disabling the initialization of imported views

    Posted Mon June 11, 2018 11:32 AM

    Hi Sueleyman,

    Rendered should always be set to true.
    Use isVisible instead to toggle between visible(=true) and not visible(=false).

    In this case view B should only be initialized onces upon load of the application.

    Regards,
    Holger


    #webMethods
    #MWS-CAF-Task-Engine
    #webMethods-BPMS


  • 3.  RE: Disabling the initialization of imported views

    Posted Wed June 13, 2018 05:35 AM

    Hi Holger,
    thanks for your answer.

    There is no ‘isVisible’ property in the import view control but I found the ‘Visible’ property in the hideable panel which wraps the import view control. Anyway setting this property did not solve my problem. I am still running into instantiation of View B which I want to prevent if View B is not shown.

    My problem with this behavior is that View B is coupled to some (data) objects that need to be instantiated. That is not needed if View A does not show View B.

    I found a topic with a similar problem: [url]http://tech.forums.softwareag.com/techjforum/posts/list/23662.page[/url]

    But if I choosed to implement this approach I have to create a dummy view which takes nearly no time to initialize. And then decide depending on the boolean which view to load. But this does not seem like a good solution for me.

    With kind regards
    Süleyman


    #webMethods-BPMS
    #webMethods
    #MWS-CAF-Task-Engine


  • 4.  RE: Disabling the initialization of imported views

    Posted Thu June 14, 2018 06:34 AM

    Hi,

    I do think the view is always rendered statically, even if hidden.

    The best you could do is to have the View B check it is hidden before calling its init methods and add a call to those upon showing the view (perhaps you can automatically call the ‘reload’ on a subview).

    Best regards,


    #MWS-CAF-Task-Engine
    #webMethods-BPMS
    #webMethods


  • 5.  RE: Disabling the initialization of imported views

    Posted Mon June 18, 2018 12:53 PM

    Hi Gerardo,
    thanks for the information and your suggestion.

    Both solutions (creating a dummy view and your solution) are workarounds for the real problem though calling a dummy view when View B is hidden seems more practical. This is because I do not want to change the inner behavior of View B just because it is not supposed to be shown. This is more likely to be a responsibility of the parent view.

    Anyway I now have an idea about how to solve my problem. Thanks for the replies.

    With kind regards

    Süleyman B.


    #webMethods-BPMS
    #MWS-CAF-Task-Engine
    #webMethods