2.8.1 Can I create my own Script Weblet?

The standard script weblet should handle most of your needs but, if you want to create your own script weblet, you can. The standard script weblet provides functionality that is essential to the correct operation of the LANSA supplied weblets and layouts. You should always call it from within your custom weblet or design your weblet, as shown in the example, to work alongside the standard script weblet.

   <xsl:import href="std_script.xsl" />
   <xsl:template name="my_script">
      <xsl:call-template name="script">
         <xsl:with-param name="javascript_files"/>
         <xsl:with-param name="trap_script_errors"/>
      <!-- Custom script functionality here -->

You must not use a template name of "script".

If you name the template of your custom weblet "script" then you will cause an infinite loop.