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.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
Expand all | Collapse all

Customizing the page close behavior for Workspaces

  • 1.  Customizing the page close behavior for Workspaces

    Posted 09/21/11 10:34 PM

    A valued customer asks:

    This technique is similar to the thread: “Disabling drop event on a Column in 3 Column Layout” (http://tech.forums.softwareag.com/viewtopic.php?t=24596&sid=287b7b61b4fc7d95cd976f0f93352285) in that both solutions involve placing a custom portlet in the (Noodle) shell footer and replace Out-of-the-box Noodle javscript function with a custom function.

    Here’s the code:

    
    var _closeUserTabService;
    
    OpenAjax.hub.subscribe("Noodle.page.load", function(name, page) {
    if (!_closeUserTabService) {
    console.log("Replacing Noodle.tab.closeUserTab");
    _closeUserTabService = Noodle.tabBarContainer.o_tabBar.closeUserTabService;
    Noodle.tabBarContainer.o_tabBar.closeUserTabService = function(modelId) {
    //TODO perform custom logic
    alert("implement custom logic here");
    
    //optionally invoke the default behavior to present the confirmation dialog
    _closeUserTabService(modelId);
    };
    }
    });

    Regards,
    –mark
    PageUnloadApp.zip (11.8 KB)


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


  • 2.  RE: Customizing the page close behavior for Workspaces

    Posted 09/28/11 08:41 AM

    Hi Mark,

     I have a scenario where, the user needs to autosave the changes in the page, when he switches to the other tab.  I have implemented the same approach using selectTabService ..instead of the closeTabService. But that doesn't work . Just switching the tab, I get a Confirmation dialog that my changes are not saved.. and I lose the changes when I press Ok.
    
       var _selectUserTabService;  
    
    OpenAjax.hub.subscribe("Noodle.page.load", function(name, page) {  
    if (!_selectUserTabService) {  
    console.log("Replacing Noodle.tab.selectUserTab");  
    _selectUserTabService = Noodle.tabBarContainer.o_tabBar.selectUserTabService;  
    Noodle.tabBarContainer.o_tabBar.closeUserTabService = function(modelId) {  
    //TODO perform custom logic  
    /// alert("implement custom logic here");  
    page.save();
    
    //optionally invoke the default behavior to present the confirmation dialog  
    _selectUserTabService(modelId);  
    };  
    }  
    });  

    But this doesn’t work for me… Please clarify.

    Thanks,
    Chandra.


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