• 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.

Pre-launch Jobs

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

  • Pre-launch Jobs

    Is there a way to call an RPG program to start before a grid is even launched?
    What I have in mind is that I need to build a file for an Extjs app to query every time an app is invoked.
    Does Valence come with any facility to allow that to happen?
    Or should I just do that in my javascript code?
    Thanks.

    PHP Code:
        launch: function() {
            
    // Call to CELS400 to preload work file
            // Note: change initialView = false in Controller.Main
            
    Valence.util.Helper.msg('Processing''Building data...');
            
    Ext.Ajax.request({
                
    url'/valence/vvcall.pgm',
                
    params: {
                    
    pgm'CX0067',
                    
    action'preLoad'
                
    },
                
    success: function(response) {
                    var 
    Ext.decode(response.responseText);
                    
    r.rec app.encodeProperties(r.rec);
                    if (
    r.success) {
                        
    Ext.create('CX0067.view.Main');
                    }
                }
            }); 

  • #2
    Valence does have an "Exit Program" labeled "Within VVCALL, app initialization" that can be specified in Portal Admin -> Settings. However, this would not send back any information back to your application so I think the launch function is the proper route to go.

    Comment

    Working...
    X