This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Feb 24, 2017, 8:59 AM
19 Posts

csjs calling ssjs - script library

  • Category: Other
  • Platform: All
  • Release: 9.0.1
  • Role: Developer
  • Tags: csjs,ssjs,library
  • Replies: 1

I have a client-side script in which I initiate some SSJS to collect string values that reside in a strings.properties file:

function confirmBeforeDelete(){
    var msgEmptySelection = "#{javascript:strings['empty']}";
    var msgConfirm = "#{javascript:strings['confirm']}";

    if(!XSP.isViewPanelRowSelected("#{id:vwPnlDefault}", "col1")) {
        !XSP.alert(msgEmptySelection);
        return false;
    }

    if(!XSP.confirm(msgConfirm)) {return false;}    
}

This works fine.

But when I store the script in a csjs library my text messages becomes: #{javascript:strings['empty']} and #{javascript:strings['confirm']}.

What am I doing wrong?

Apr 4, 2017, 8:28 PM
94 Posts
yep, can't do that

I tried the same thing... the id's are generated when the page loads, but code in the script library does not get executed.  So, one way around it is to calculate the id's in the page and then pass those id's as parameters of the function in the script library.


This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal