-1

I would like to read a value from a properties file in the beforepageload event. unfortunately I load the properties file as a variable via a theme but ofcourse this does not work because it is not available yet.

Is there anoter way to read in the file via SSJS ?

Patrick Kwinten
  • 1,988
  • 2
  • 14
  • 26

1 Answers1

1

You can add the properties file as a "bundle" to the XPage's resources:

<xp:this.resources>
    <xp:bundle src="/XYZ.properties" var="XYZ"></xp:bundle>
</xp:this.resources>

and directly get any of its property values with:

var propvalue = XYZ.propkey;
xpages-noob
  • 1,569
  • 1
  • 10
  • 37