WAM105 - Create Your Own Weblet
Objectives
To create Toolbar Menu Item weblet and a Toolbar weblet. A simple WAM application will then be used to test the Toolbar weblet.
The finished application will look like the following:
In order to complete this exercise, you must complete the following:
- Review Weblets
Before You Begin
This exercise does not depend on knowledge gained from all preceding exercises. It is recommended that the following have been completed:
WAM005 - Create Your First WAM
Layouts are a type of Weblet. They allow you to customize the overall look and feel of a web site or web application.
Weblets are also building blocks of your WAM HTML page. They can be categorized into 2 main groups.
- Primitive Weblets typically have a 1-to-1 relationship with an HTML Tag/Element (eg: Push Button, Checkbox, Combo Box, Anchor, Clickable Image, an Input box, etc)
- Composite Weblets provide additional functionality combining Javascript, CSS, Primitive Weblets and HTML (eg: Grid, Tabsheets, etc)
XSL Templates
The <xsl:template name="my_template_name"> </xsl:template> element is very similar to the SUBROUTINE command used to define Subroutines in LANSA.
Parameters can be received by a template by defining
<xsl:param name="param_name" /> elements within the template.
Calling XSL Templates
The <xsl:call-template name="layout-form.private"> element is very similar to the EXECUTE command used to call subroutines in LANSA.
Parameters can be passed on the call using the
<xsl:with-param name="param_name" select="param_value"/> element.
To learn more about XSLT, see http://www.w3schools.com/xsl/default.asp