Plex 2E

  • 1.  Dynamically loading JAVA Tabs

    Posted Dec 08, 2014 04:12 AM

    Has anyone managed to load tabs dynamically with a dynamic function call. In addition the dynamically called function could be the same one and it should exist as many times as is needed (like calling the same  MDI child multiple times).

     

    I have managed t create the tabs, but when testing with a hard coded function call (before compiling) it is the same function, as the text typed in on the one tab shows in the other tab as well.

     

    I need to be able to read a function name and description from a table and show it in a tab. The same function could be loaded on multiple different tabs and needs to be a new instance each time. This needs to happen at run time.

     

    Any suggestions or pointers would be welcome.

     

    Thanks

         Gavin



  • 2.  Re: Dynamically loading JAVA Tabs

    Posted Dec 08, 2014 03:49 PM

    In the hope you have missed the following..very much doubt it...but in WINC I have used the following property to ensure new instances each time. And I remember from the past people creating their own 'frame parent' patterns using butttons as tabs as they could never get the tabs to work dynamically (back ground color)

     

    Single Child Property

    Applies to: Region (of type Site)

    Determines whether multiple child panels can be loaded into the site region at run time. If set to Yes, an existing child panel is automatically unloaded when a new child panel is loaded.

     

     

    Actually looking at Tab strip in the coming days (WinC variant) and have a task to add 3 new tabs but want them dynamic according to authority so will let you know if I find anything.



  • 3.  Re: Dynamically loading JAVA Tabs

    Posted Jan 13, 2015 12:01 PM

    George -

     

    in WinC the main problem when using dynamic tabs is the fact that the event mechanism relies on function names and not window handles. You will need to implement your own event handling to solve the "same function in different tabs" problem.

     

    Best

    Lorenz



  • 4.  Re: Dynamically loading JAVA Tabs

    Posted Jan 13, 2015 01:02 PM

    I solved it by having a generic tab leaf which itself has a childsite that you load what ever child you want.

     

    Tab Parent calls 10, 20, 30 how ever many is you max amount of tabs of identical implementations of the same generic tab.

     

    The generic tab is loaded into the parents tab site but then on show panel etc simply loads its own site. This allows the same function to be used in many tabs