Forums

Find answers, ask questions, and connect with our
community all around the world.

Home Forum Omnis General Forum remote subforms inside objects

  • remote subforms inside objects

    Posted by Obonye on June 17, 2024 at 9:48 am

    Hi Members,

    I have created a sub jsWindow object in a pagedpane object inside page number 2. I have also created a button inside page number 1 to call a method in the sub window. The method calling the sub window does not work until I first click tab number 2 then tab number 1. Has anyone found a way to straightaway call the method in a sub window from a pagedpane without first clicking on tab number 2?

    Kind regards

    Martin Obongita

    Paul Mulroney replied 1 week, 3 days ago 3 Members · 3 Replies
  • 3 Replies
  • Dr. Robert-Andreas Schöning

    Member
    June 17, 2024 at 10:01 am

    Hi Martin,

    the subform initializes whe the tab becomes visible.

    My approch: The button click sets the panes $currentpage to 2 -> the subform initializes

    Hava a method in the container form that does the initializing e.g. $initsubform

    In your subform:

    – Have a Method e.g. $getData where you call $cinst().$container().$initSubform

    – Override method $loadfinised()

    – Call $getData() from there to get all you need from the Container form

    Regards

    Robert

    • Obonye

      Member
      June 18, 2024 at 9:52 am

      Thank you @Dr. Robert-Andreas Schöning for the help on this. I tried to implement your ideas but unfortunately, the setup did not load the remove form at $event button click.

  • Paul Mulroney

    Member
    July 8, 2024 at 8:18 am

    Maybe refactor the code so you’re not calling code in another subform? Maybe one subform shouldn’t be calling another – can the code be put in the top level form, or in an object instead?

Log in to reply.