• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

[HELPED] Share variables / functions / listeners between tabs (different apps)?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [HELPED] Share variables / functions / listeners between tabs (different apps)?

    Hi Support-team,

    I have a question about whether it is possible to share functions / variables / listeners between two applications executed within the Valence portal, other than launching an app and passing parameters in the url? What are the possibilities within / via the Valence Portal?

    If this is not possible we will use Ext.Loader and load the separate app within the basic app?

    Thanks for looking into this!

    Bye,

    Siebe Vos

  • #2
    @support-team,

    Any suggestions?

    Thanks!

    Siebe

    Comment


    • #3
      I'm confused exactly what you are asking, so I'll answer both questions.

      You can share javascript files full of functions or controllers by including them in more than one application.

      If you are asking about calling form one application to another, while it is open and performing an action, then the approach you want to take is applying that function to the 'window' (this will represent the iFrame for a Valence app). Such as:

      Code:
      window.goCustomer = function(cusId) {
        //take action in proper scope to load info or navigate to proper place
      }

      To call this from another application, use Valence.app.getReference(###) passing the number of the app id record. This will return a handle which you can call the function goCustomer, or whatever you name it.

      Comment


      • #4
        is Valence.app.getReference() documented anywhere?

        Comment


        • #5
          Thanks for your answer, I will take a look!

          Comment

          Working...
          X