list.tml Lists can be powerfully handled by getting to know the List Context Tool and its methods. Here is a simple example of transforming default arrays to more powerful lists implementing the java.util.List interface and thus being uniformly managed by the List Tool.
wizard.tml An example of how to render a form relying exclusively on introspection obtain the "View", the labels, the controls, the values. Labels are rendered in a locale sensitive manner:
$field.MetaField.getLabel($User.Locale):achieves label localization in the WM script.
wizardform.tml An example of to interact with server state variables and then how to evaluate conditions and parse in the correct template.
wizardform.tml An example of to interact with server state variables and then how to evaluate conditions and parse in the correct template.
view.tml An example of a complete object report showing the "peers" of a logical view. In most web apps, views will be linked together as logical pages.
View.java An interface definition which represents the server-side equivalent of a webmacro "skin". During template evaluation, an instance implementing this interface provides the core lifecylce and state management methods. A convenient and globally unique identifier can be passed around as an http get and post parameter. Views are often chained together to produce wizards and multi-phased input models. State is always maintained inside the View implementation members.
ViewFactory.java Views are instantiated by factories which return an instance implementing the View interface.
GeneralView.java A view factory which supports multiple panels in a view.
GeneralCommitView.java A view factory which adds a commit view panel as the last view.
ReferralView.java A concrete view containing two panels. The first allows for the panel to create and manage a vector of elements. The second panel is for a single element. The last panel is for a commit/confirmation of the views. This is an excellent example of how the subclass has been relieved of all complexity in the view management. It is focused on the application elements of the referred parties and the referring party.
ViewActionHandler.java You must add to a view one or more action handlers. The general case.
CommitActionHandler.java The base handler for the proverbial "OK. Do something with this input!"
InsertInterimBOHandler.java A commit handler which assembles the view elements and creates a persistent business object, an InterimBusinessObject. These objects are persisted as elements in a Very Large Hashtable.
These are specimens contributed by Lane Sharman. Others are more than welcome to add to this file which is maintained as index.html in cvs under the examples directory.
The examples are best viewed with a text editor, not a browser.
Other example resources:
Scripting tutorial under development by Keats Kirsch.
Map of the WM wiki site with many good development links. Be sure to check the date on the bottom of the page for when it was last edited. Some pages are out of date.
Many have generously contributed ideas and approaches in the current distribution. Check these out for ideas on how to solve a particular problem using WebMacro.
jldap Practice at Open Doors Software for creating a java language for data acquistion and presentment for web applications we write.