You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(11) |
Nov
(97) |
Dec
(35) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(12) |
Feb
(55) |
Mar
(21) |
Apr
(3) |
May
(7) |
Jun
(25) |
Jul
(108) |
Aug
(23) |
Sep
|
Oct
|
Nov
|
Dec
(4) |
2006 |
Jan
|
Feb
|
Mar
(6) |
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
(13) |
Feb
|
Mar
(257) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(38) |
Dec
|
2009 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
(63) |
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(1) |
2011 |
Jan
|
Feb
(1) |
Mar
|
Apr
(1) |
May
(1) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Tim P <ti...@us...> - 2008-03-20 10:24:10
|
Update of /cvsroot/webmacro/webmacro/src/org/webmacro/util In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv31809/src/org/webmacro/util Modified Files: LogTargetFactory.java Log Message: Checkstyle: make final, javadoc Index: LogTargetFactory.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/src/org/webmacro/util/LogTargetFactory.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** LogTargetFactory.java 30 Jul 2005 04:00:37 -0000 1.5 --- LogTargetFactory.java 20 Mar 2008 10:24:06 -0000 1.6 *************** *** 44,58 **** * @since 0.99 */ ! public class LogTargetFactory { private static LogTargetFactory _instance = new LogTargetFactory(); public static class LogCreationException extends WebMacroException { - /** - * - */ private static final long serialVersionUID = 1L; --- 44,56 ---- * @since 0.99 */ ! public final class LogTargetFactory { private static LogTargetFactory _instance = new LogTargetFactory(); + /** Thrown when a log cannot be created. */ public static class LogCreationException extends WebMacroException { private static final long serialVersionUID = 1L; *************** *** 63,72 **** } ! /** Creates new LogTargetFactory */ private LogTargetFactory () { } ! /** return the only instance of this LogTargetFactory */ public static final LogTargetFactory getInstance () { --- 61,70 ---- } ! /** Creates new LogTargetFactory. */ private LogTargetFactory () { } ! /** Return the only instance of this LogTargetFactory. */ public static final LogTargetFactory getInstance () { *************** *** 75,79 **** /** ! * Creates a new <code>org.webmacro.util.LogTarget</code> * * @param broker the Broker that is requesting to create the log. The --- 73,77 ---- /** ! * Creates a new <code>org.webmacro.util.LogTarget</code>. * * @param broker the Broker that is requesting to create the log. The *************** *** 111,113 **** return lt; } ! } \ No newline at end of file --- 109,112 ---- return lt; } ! } ! |
From: Tim P <ti...@us...> - 2008-03-20 10:20:56
|
Update of /cvsroot/webmacro/webmacro/src/org/webmacro/resource In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv30264/src/org/webmacro/resource Modified Files: BrokerTemplateProvider.java Log Message: Checkstyle: organise imports Index: BrokerTemplateProvider.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/src/org/webmacro/resource/BrokerTemplateProvider.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** BrokerTemplateProvider.java 12 Jun 2003 00:47:47 -0000 1.5 --- BrokerTemplateProvider.java 20 Mar 2008 10:20:50 -0000 1.6 *************** *** 21,35 **** */ - package org.webmacro.resource; ! import org.webmacro.*; import org.webmacro.util.Settings; /** ! * The BrokerTemplateProvider loads templates through ! * Broker.getResource(). Templates might be loaded from a file, from ! * a WAR, from a JAR, etc. It just passes the requests on to a ! * BrokerTemplateProviderHelper object. * @author Brian Goetz * @since 0.96 --- 21,38 ---- */ package org.webmacro.resource; ! import org.webmacro.Broker; ! import org.webmacro.InitException; ! import org.webmacro.Log; ! import org.webmacro.Provider; ! import org.webmacro.ResourceException; import org.webmacro.util.Settings; /** ! * The BrokerTemplateProvider loads templates through Broker.getResource(). ! * Templates might be loaded from a file, from a WAR, from a JAR, etc. ! * It just passes the requests on to a BrokerTemplateProviderHelper object. ! * * @author Brian Goetz * @since 0.96 |
From: Tim P <ti...@us...> - 2008-03-20 10:19:55
|
Update of /cvsroot/webmacro/webmacro/src/org/webmacro/resource In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv29783/src/org/webmacro/resource Modified Files: SimpleCacheManager.java Log Message: Checkstyle: organise imports Index: SimpleCacheManager.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/src/org/webmacro/resource/SimpleCacheManager.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SimpleCacheManager.java 30 Jul 2003 02:28:14 -0000 1.2 --- SimpleCacheManager.java 20 Mar 2008 10:19:51 -0000 1.3 *************** *** 1,16 **** package org.webmacro.resource; ! import java.util.*; - import org.webmacro.Log; import org.webmacro.Broker; import org.webmacro.InitException; import org.webmacro.ResourceException; import org.webmacro.util.Settings; import EDU.oswego.cs.dl.util.concurrent.ConcurrentHashMap; /** ! * SimpleCacheManager -- a basic cache manager backed by ConcurrentHashMap which does not support reloading, ! * or expiration * * @author Brian Goetz --- 1,17 ---- package org.webmacro.resource; ! import java.util.Map; import org.webmacro.Broker; import org.webmacro.InitException; + import org.webmacro.Log; import org.webmacro.ResourceException; import org.webmacro.util.Settings; + import EDU.oswego.cs.dl.util.concurrent.ConcurrentHashMap; /** ! * SimpleCacheManager -- a basic cache manager backed by ConcurrentHashMap ! * which does not support reloading, or expiration. * * @author Brian Goetz *************** *** 80,84 **** /** ! * Put an object in the cache */ public void put(final Object query, Object resource) { --- 81,85 ---- /** ! * Put an object in the cache. */ public void put(final Object query, Object resource) { *************** *** 87,91 **** /** ! * Remove an element */ public void invalidate(final Object query) { --- 88,92 ---- /** ! * Remove an element. */ public void invalidate(final Object query) { |
From: Tim P <ti...@us...> - 2008-03-20 09:49:33
|
Update of /cvsroot/webmacro/webmacro/src/org/webmacro/engine In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv16957/src/org/webmacro/engine Modified Files: PropertyOperatorCache.java Log Message: Checkstyle: organise imports Index: PropertyOperatorCache.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/src/org/webmacro/engine/PropertyOperatorCache.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** PropertyOperatorCache.java 19 Feb 2004 08:23:55 -0000 1.22 --- PropertyOperatorCache.java 20 Mar 2008 09:49:29 -0000 1.23 *************** *** 21,38 **** */ - package org.webmacro.engine; - import org.webmacro.*; - import org.webmacro.resource.CacheManager; - import org.webmacro.resource.SimpleCacheManager; - import org.webmacro.util.*; - import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.Modifier; ! import java.util.*; final public class PropertyOperatorCache { --- 21,57 ---- */ package org.webmacro.engine; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.Modifier; ! import java.util.ArrayList; ! import java.util.Enumeration; ! import java.util.HashMap; ! import java.util.Iterator; ! import java.util.List; ! import java.util.Map; ! import java.util.StringTokenizer; ! import java.util.Vector; + import org.webmacro.Broker; + import org.webmacro.Context; + import org.webmacro.InitException; + import org.webmacro.Log; + import org.webmacro.PropertyException; + import org.webmacro.resource.CacheManager; + import org.webmacro.resource.SimpleCacheManager; + import org.webmacro.util.ArrayIterator; + import org.webmacro.util.EnumIterator; + import org.webmacro.util.PrimitiveArrayIterator; + import org.webmacro.util.PropertyMethod; + import org.webmacro.util.Settings; + + /** + * @author Brian Goetz + * @since 28 Apr 2001 + * + */ final public class PropertyOperatorCache { *************** *** 55,59 **** if (cacheManager == null || cacheManager.equals("")) { ! _log.info("CachingProvider: No cache manager specified for PropertyOperator, using SimpleCacheManager"); _cache = new SimpleCacheManager(); } --- 74,80 ---- if (cacheManager == null || cacheManager.equals("")) { ! _log.info("CachingProvider: " + ! "No cache manager specified for PropertyOperator, " + ! "using SimpleCacheManager"); _cache = new SimpleCacheManager(); } *************** *** 83,87 **** { Class c = Class.forName(className); ! String okMethList = b.getSetting("RestrictedClasses.AllowedMethods." + className); ArrayList okMeths = null; if (okMethList != null) --- 104,109 ---- { Class c = Class.forName(className); ! String okMethList = b.getSetting( ! "RestrictedClasses.AllowedMethods." + className); ArrayList okMeths = null; if (okMethList != null) *************** *** 142,145 **** --- 164,168 ---- * introspection described above. Begin reading names at position * start in the array of names. + * * @param context is used to resolve sub-properties in arguments * @param instance is the root of introspection *************** *** 167,171 **** /** ! * Calls getProperty(context, instance, names, 0) */ final public Object getProperty(final Context context, --- 190,194 ---- /** ! * Calls getProperty(context, instance, names, 0). */ final public Object getProperty(final Context context, *************** *** 181,184 **** --- 204,208 ---- * Given a property description name, attempt to set the property * value to the supplied object. + * * @param context An object containing a property * @param names The string names of that property *************** *** 228,231 **** --- 252,256 ---- * Evaluate the supplied object and work out a way to return it * as an iterator. + * * @param instance an object believed to represent a list * @return an Iterator that iterates through that list *************** *** 820,824 **** } ! if ( start <= end) { try --- 845,849 ---- } ! if (start <= end) { try |
From: Tim P <ti...@us...> - 2008-03-20 09:42:33
|
Update of /cvsroot/webmacro/webmacro/src/org/webmacro/directive In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14309/src/org/webmacro/directive Modified Files: WhileDirective.java Log Message: Checkstyle: missing line end at end of file Index: WhileDirective.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/src/org/webmacro/directive/WhileDirective.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** WhileDirective.java 18 Mar 2008 19:52:21 -0000 1.2 --- WhileDirective.java 20 Mar 2008 09:42:30 -0000 1.3 *************** *** 8,17 **** * * - * @author Mike Weerdenburg - * @author Marcel Huijkman - * - * @since 14-01-2005 - * - * @version 02-03-2005 */ --- 8,11 ---- *************** *** 38,47 **** * release 2.0 as an experimental directive. * ! * <pre> ! * TODO: Introduce unit test and mainline or drop the directive. ! * </pre> * */ - class WhileDirective extends Directive { --- 32,43 ---- * release 2.0 as an experimental directive. * ! * @todo Introduce unit test and mainline or drop the directive. * + * @author Mike Weerdenburg + * @author Marcel Huijkman + * + * @since 14-01-2005 + * @version 02-03-2005 */ class WhileDirective extends Directive { *************** *** 54,64 **** private static final int WHILE_BLOCK = 4; ! /* the condition as Object */ private Object _obCondition; ! /* the condition as a Macro */ private Macro _macroCondition = null; ! /* the condition as a boolean */ private boolean boolExpression = false; --- 50,60 ---- private static final int WHILE_BLOCK = 4; ! /* The condition as Object. */ private Object _obCondition; ! /* The condition as a Macro. */ private Macro _macroCondition = null; ! /* The condition as a boolean. */ private boolean boolExpression = false; *************** *** 88,92 **** /** ! * the name given to the directive by webmacro configuration. */ protected String _directiveName; --- 84,88 ---- /** ! * The name given to the directive by webmacro configuration. */ protected String _directiveName; *************** *** 140,144 **** } ! // evaluate the condition against the current context. if (_macroCondition != null) boolExpression = Expression.isTrue(_macroCondition --- 136,140 ---- } ! // evaluate the condition against the current context if (_macroCondition != null) boolExpression = Expression.isTrue(_macroCondition *************** *** 174,176 **** v.endDirective(); } ! } \ No newline at end of file --- 170,173 ---- v.endDirective(); } ! } ! |
From: Tim P <ti...@us...> - 2008-03-20 09:39:21
|
Update of /cvsroot/webmacro/webmacro/src/org/webmacro/engine In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv13137/src/org/webmacro/engine Modified Files: Variable.java Log Message: Checkstyle: organise imports Index: Variable.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/src/org/webmacro/engine/Variable.java,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** Variable.java 17 Mar 2006 19:00:40 -0000 1.27 --- Variable.java 20 Mar 2008 09:39:17 -0000 1.28 *************** *** 24,32 **** package org.webmacro.engine; - import org.webmacro.*; - import org.webmacro.util.Named; - import java.io.IOException; // PRIMARY CLASS: Variable --- 24,37 ---- package org.webmacro.engine; import java.io.IOException; + import org.webmacro.Context; + import org.webmacro.FastWriter; + import org.webmacro.Macro; + import org.webmacro.PropertyException; + import org.webmacro.TemplateVisitor; + import org.webmacro.Visitable; + import org.webmacro.util.Named; + // PRIMARY CLASS: Variable *************** *** 89,93 **** /** ! * The name as an array */ protected Object[] _names; --- 94,98 ---- /** ! * The name as an array. */ protected Object[] _names; *************** *** 126,130 **** /** ! * Like getPropertyNames, but only works if isSimpleName is true */ public final String getName () --- 131,135 ---- /** ! * Like getPropertyNames, but only works if isSimpleName is true. */ public final String getName () *************** *** 137,141 **** /** * Returns true if the Variable describes a simple name (one with only ! * one element) */ public boolean isSimpleName () --- 142,146 ---- /** * Returns true if the Variable describes a simple name (one with only ! * one element). */ public boolean isSimpleName () *************** *** 270,274 **** /** ! * Helper method to construct a String name from a Object[] name */ final static String makeName (Object[] names) --- 275,279 ---- /** ! * Helper method to construct a String name from a Object[] name. */ final static String makeName (Object[] names) *************** *** 305,309 **** /** ! * Return the canonical name for this variable */ public synchronized String getVariableName () --- 310,314 ---- /** ! * Return the canonical name for this variable. */ public synchronized String getVariableName () |
From: Tim P <ti...@us...> - 2008-03-20 09:36:05
|
Update of /cvsroot/webmacro/webmacro/src/org/webmacro/util In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv11642/src/org/webmacro/util Modified Files: Instantiator.java Log Message: Checkstyle: make final Index: Instantiator.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/src/org/webmacro/util/Instantiator.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Instantiator.java 17 Oct 2005 04:21:26 -0000 1.1 --- Instantiator.java 20 Mar 2008 09:35:59 -0000 1.2 *************** *** 35,39 **** * configuration property. * ! * Used by BeanDirective and SetpropsDirective * * @author Keats Kirsch --- 35,39 ---- * configuration property. * ! * Used by BeanDirective and SetpropsDirective. * * @author Keats Kirsch *************** *** 41,45 **** * @see org.webmacro.directive.SetpropsDirective */ ! public class Instantiator { --- 41,45 ---- * @see org.webmacro.directive.SetpropsDirective */ ! final public class Instantiator { *************** *** 223,224 **** --- 223,225 ---- } } + |
From: Tim P <ti...@us...> - 2008-03-20 09:33:13
|
Update of /cvsroot/webmacro/webmacro/src/org/webmacro/servlet In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv10532/src/org/webmacro/servlet Modified Files: Form.java Log Message: Checkstyle: new line at end of file Index: Form.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/src/org/webmacro/servlet/Form.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Form.java 13 Apr 2006 11:42:19 -0000 1.12 --- Form.java 20 Mar 2008 09:33:06 -0000 1.13 *************** *** 20,41 **** * See www.webmacro.org for more information on the WebMacro project. * - * @author Marcel Huijkman - * - * @version 15-07-2002 - * */ - package org.webmacro.servlet; ! import org.webmacro.UnsettableException; ! import org.webmacro.util.Bag; import javax.servlet.http.HttpServletRequest; ! import java.util.Enumeration; /** * Provide access to form variables. */ final public class Form implements Bag --- 20,40 ---- * See www.webmacro.org for more information on the WebMacro project. * */ package org.webmacro.servlet; ! import java.util.Enumeration; import javax.servlet.http.HttpServletRequest; ! ! import org.webmacro.UnsettableException; ! import org.webmacro.util.Bag; /** * Provide access to form variables. + * + * @author Marcel Huijkman + * @version 15-07-2002 */ final public class Form implements Bag *************** *** 48,52 **** /** ! * Read the form data from the supplied Request object */ Form(final HttpServletRequest r) --- 47,51 ---- /** ! * Read the form data from the supplied Request object. */ Form(final HttpServletRequest r) *************** *** 138,142 **** /** ! * Unsupported */ final public void remove (String key) --- 137,141 ---- /** ! * Unsupported. */ final public void remove (String key) *************** *** 166,168 **** } ! } \ No newline at end of file --- 165,168 ---- } ! } ! |
From: Tim P <ti...@us...> - 2008-03-20 09:31:29
|
Update of /cvsroot/webmacro/webmacro/src/org/webmacro/resource In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv10066/src/org/webmacro/resource Modified Files: TemplateLoaderHelper.java Log Message: Checkstyle: organise imports Index: TemplateLoaderHelper.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/src/org/webmacro/resource/TemplateLoaderHelper.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** TemplateLoaderHelper.java 12 Jun 2003 00:47:47 -0000 1.4 --- TemplateLoaderHelper.java 20 Mar 2008 09:31:22 -0000 1.5 *************** *** 22,30 **** package org.webmacro.resource; - import org.webmacro.*; - import org.webmacro.engine.FileTemplate; - import org.webmacro.engine.StreamTemplate; - import org.webmacro.util.Settings; - import java.io.File; import java.io.IOException; --- 22,25 ---- *************** *** 32,35 **** --- 27,39 ---- import java.net.URLConnection; + import org.webmacro.Broker; + import org.webmacro.InitException; + import org.webmacro.ResourceException; + import org.webmacro.Template; + import org.webmacro.TemplateException; + import org.webmacro.engine.FileTemplate; + import org.webmacro.engine.StreamTemplate; + import org.webmacro.util.Settings; + /** * Helper class for template loaders to actuall load a Template. *************** *** 49,53 **** /** ! * Construct a new TemplateLoaderHelper object */ public TemplateLoaderHelper () --- 53,57 ---- /** ! * Construct a new TemplateLoaderHelper object. */ public TemplateLoaderHelper () *************** *** 57,61 **** /** ! * Initialize this object * @param b broker to use * @param config configuration to initialize from --- 61,65 ---- /** ! * Initialize this object. * @param b broker to use * @param config configuration to initialize from *************** *** 138,142 **** /** * Encapsulates calls to Template.parse and wraps ! * checked exceptions into ResourceExceptions */ private void parseTemplate (Template template) throws ResourceException --- 142,146 ---- /** * Encapsulates calls to Template.parse and wraps ! * checked exceptions into ResourceExceptions. */ private void parseTemplate (Template template) throws ResourceException *************** *** 200,201 **** --- 204,206 ---- } } + |
From: Tim P <ti...@us...> - 2008-03-20 00:13:09
|
Update of /cvsroot/webmacro/webmacro/examples/advanced In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv23622/examples/advanced Modified Files: index.html Log Message: Comment out the broken links Index: index.html =================================================================== RCS file: /cvsroot/webmacro/webmacro/examples/advanced/index.html,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** index.html 20 Mar 2008 00:10:20 -0000 1.8 --- index.html 20 Mar 2008 00:13:05 -0000 1.9 *************** *** 45,51 **** </p> <h3 align="center"> Other example resources ! <h3> <p> <a href=http://wiki.webmacro.org/WebMacroScriptLanguage>Scripting</a> tutorial --- 45,52 ---- </p> + <!-- <h3 align="center"> Other example resources ! </h3> <p> <a href=http://wiki.webmacro.org/WebMacroScriptLanguage>Scripting</a> tutorial *************** *** 54,65 **** <p> <a href=http://wiki.webmacro.org/SiteMap>Map</a> 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. - </p> - <p> - 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. </p> </body> </html> --- 55,60 ---- <p> <a href=http://wiki.webmacro.org/SiteMap>Map</a> of the WM wiki site with many good development links. </p> + --> </body> </html> |
From: Tim P <ti...@us...> - 2008-03-20 00:10:24
|
Update of /cvsroot/webmacro/webmacro/examples/advanced In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv22568/examples/advanced Modified Files: index.html wizard.tml wizardform.tml view.tml Log Message: Make work with jetty out of the box Index: index.html =================================================================== RCS file: /cvsroot/webmacro/webmacro/examples/advanced/index.html,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** index.html 27 Sep 2005 05:45:17 -0000 1.7 --- index.html 20 Mar 2008 00:10:20 -0000 1.8 *************** *** 1,20 **** <html> ! <center> ! Templates, Java Class Files, Further Reference ! <br>Last Updated 1-Oct-2005 ! </center> <p> These examples provide advanced usage of WebMacro and features in Release 2. ! These examples cannot be run out-of-the-box as can, for example, WebMacro Wiki. However, they provide a great insight into how WebMacro can be used to create text applications, web pages, source files, xml, and other text-based files. <p> <a href=list.tml>list.tml</a> 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. <p> ! <a href=wizard.tml>wizard.tml</a> 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: <pre> $field.MetaField.getLabel($User.Locale): --- 1,34 ---- <html> ! <title> ! WebMacro usage examples ! </title> ! <body> ! <h2 align="center"> ! WebMacro usage examples ! </h2> ! <h4 align="center">Last Updated 19-Mar-2008</h4> <p> These examples provide advanced usage of WebMacro and features in Release 2. ! </p> ! <p> However, they provide a great insight into how WebMacro can be used to create text applications, web pages, source files, xml, and other text-based files. + </p> <p> <a href=list.tml>list.tml</a> 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. + </p> + <p> + <em> + The following examples are displayed for illustration but require other machinery + to actually be in place to be rendered. + </em> + </p> <p> ! <a href=wizard.tml>wizard.tml</a> An example of how to render a form relying exclusively on ! introspection to obtain the "View", the labels, the controls, the values. ! Labels are rendered in a locale sensitive manner: <pre> $field.MetaField.getLabel($User.Locale): *************** *** 23,66 **** <p> ! <a href=wizardform.tml>wizardform.tml</a> An example of to interact with server state variables ! and then how to evaluate conditions and parse in the correct template. ! ! <p> ! <a href=wizardform.tml>wizardform.tml</a> An example of to interact with server state variables ! and then how to evaluate conditions and parse in the correct template. ! <p> <a href=view.tml>view.tml</a> 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. ! <center> ! <p> ! <hr size=1 width=50%> ! The examples are best viewed with a text editor, not a browser. ! <p> ! ! <hr size=1 width=50%> ! <p> ! Other example resources: ! </center> <p> <a href=http://wiki.webmacro.org/WebMacroScriptLanguage>Scripting</a> tutorial under development by Keats Kirsch. ! <p> <a href=http://wiki.webmacro.org/SiteMap>Map</a> 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. <p> 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. ! ! <p> ! <a href=http://www.wangjammers.com/ignition>Ignition</a> ! For a comprehensive web builder based on WebMacro. ! ! ! </html> --- 37,66 ---- <p> ! <a href=wizardform.tml>wizardform.tml</a> An example of interacting with server state variables ! and how to evaluate conditions and parse in the correct template. ! </p> <p> <a href=view.tml>view.tml</a> 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. + </p> ! <h3 align="center"> ! Other example resources ! <h3> <p> <a href=http://wiki.webmacro.org/WebMacroScriptLanguage>Scripting</a> tutorial under development by Keats Kirsch. ! </p> <p> <a href=http://wiki.webmacro.org/SiteMap>Map</a> 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. + </p> <p> 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. ! </p> ! </body> </html> Index: wizardform.tml =================================================================== RCS file: /cvsroot/webmacro/webmacro/examples/advanced/wizardform.tml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** wizardform.tml 1 Jul 2001 15:45:13 -0000 1.1 --- wizardform.tml 20 Mar 2008 00:10:20 -0000 1.2 *************** *** 1,2 **** --- 1,4 ---- + #set $Response.ContentType="text/plain" + #text #begin <!-- wizardform.tml *************** *** 61,62 **** --- 63,65 ---- #parse "footer.tml" } + #end \ No newline at end of file Index: view.tml =================================================================== RCS file: /cvsroot/webmacro/webmacro/examples/advanced/view.tml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** view.tml 27 Sep 2005 05:45:17 -0000 1.2 --- view.tml 20 Mar 2008 00:10:20 -0000 1.3 *************** *** 1,2 **** --- 1,4 ---- + #set $Response.ContentType="text/plain" + #text #begin <html> *************** *** 19,21 **** </html> ! --- 21,23 ---- </html> ! #end \ No newline at end of file Index: wizard.tml =================================================================== RCS file: /cvsroot/webmacro/webmacro/examples/advanced/wizard.tml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** wizard.tml 1 Jul 2001 15:45:13 -0000 1.1 --- wizard.tml 20 Mar 2008 00:10:20 -0000 1.2 *************** *** 1,2 **** --- 1,4 ---- + #set $Response.ContentType="text/plain" + #text #begin <!-- wizard.tml *************** *** 32,33 **** --- 34,36 ---- </table> + #end \ No newline at end of file |
From: Tim P <ti...@us...> - 2008-03-20 00:09:55
|
Update of /cvsroot/webmacro/webmacro/examples In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv22156 Removed Files: web.xml Log Message: Moved down to WEB-INF --- web.xml DELETED --- |
From: Tim P <ti...@us...> - 2008-03-20 00:09:14
|
Update of /cvsroot/webmacro/webmacro/examples/WEB-INF In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv22130/WEB-INF Added Files: web.xml Log Message: Moved down from above, mapped .tml extension to TemplateServlet --- NEW FILE: web.xml --- <?xml version="1.0" encoding="ISO-8859-1"?> <!-- Copyright 2004 The Apache Software Foundation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app> <display-name>WebMacro</display-name> <servlet> <servlet-name>invoker</servlet-name> <servlet-class> org.mortbay.jetty.servlet.Invoker </servlet-class> </servlet> <servlet-mapping> <servlet-name>invoker</servlet-name> <url-pattern>/servlet/*</url-pattern> </servlet-mapping> <servlet> <servlet-name>TemplateServlet</servlet-name> <servlet-class> org.webmacro.servlet.TemplateServlet </servlet-class> </servlet> <servlet-mapping> <servlet-name>TemplateServlet</servlet-name> <url-pattern>*.tml</url-pattern> </servlet-mapping> </web-app> |
From: Tim P <ti...@us...> - 2008-03-20 00:08:30
|
Update of /cvsroot/webmacro/webmacro/examples/WEB-INF In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv21746/WEB-INF Log Message: Directory /cvsroot/webmacro/webmacro/examples/WEB-INF added to the repository |
From: Tim P <ti...@us...> - 2008-03-19 23:51:15
|
Update of /cvsroot/webmacro/webmacro/src/org/webmacro/engine In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv13199/src/org/webmacro/engine Modified Files: Block.java Log Message: Checkstyle: Organise imports Index: Block.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/src/org/webmacro/engine/Block.java,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** Block.java 12 Jun 2003 00:47:45 -0000 1.24 --- Block.java 19 Mar 2008 23:51:11 -0000 1.25 *************** *** 24,33 **** package org.webmacro.engine; - import org.webmacro.*; - import org.webmacro.util.Encoder; - import java.io.IOException; import java.util.List; /** * A Block is essentially a Macro[] that knows how to write itself --- 24,38 ---- package org.webmacro.engine; import java.io.IOException; import java.util.List; + import org.webmacro.Context; + import org.webmacro.FastWriter; + import org.webmacro.Macro; + import org.webmacro.PropertyException; + import org.webmacro.TemplateVisitor; + import org.webmacro.Visitable; + import org.webmacro.util.Encoder; + /** * A Block is essentially a Macro[] that knows how to write itself |
From: Tim P <ti...@us...> - 2008-03-19 23:46:44
|
Update of /cvsroot/webmacro/webmacro/tutorial In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv11235/tutorial Modified Files: guts.html Log Message: Typo Index: guts.html =================================================================== RCS file: /cvsroot/webmacro/webmacro/tutorial/guts.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** guts.html 18 Jun 2001 03:47:59 -0000 1.1 --- guts.html 19 Mar 2008 23:46:41 -0000 1.2 *************** *** 27,31 **** analysis, but also extends that specification. <p> ! JavaBeans is essentially a set of conding conventions for how to name accessor methods. If you follow those conventions then lots of tools, including WebMacro, will be able to analyze your class --- 27,31 ---- analysis, but also extends that specification. <p> ! JavaBeans is essentially a set of coding conventions for how to name accessor methods. If you follow those conventions then lots of tools, including WebMacro, will be able to analyze your class |
From: Tim P <ti...@us...> - 2008-03-19 23:42:41
|
Update of /cvsroot/webmacro/webmacro/examples/advanced In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv9696/examples/advanced Modified Files: list.tml Log Message: Get working with TemplateServlet Index: list.tml =================================================================== RCS file: /cvsroot/webmacro/webmacro/examples/advanced/list.tml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** list.tml 19 Mar 2008 23:22:30 -0000 1.3 --- list.tml 19 Mar 2008 23:42:38 -0000 1.4 *************** *** 6,13 **** ## create arrays and then create more powerful list structures ## available for manipulation by the list tool: ! #set $hrefs = ["AboutOpenDoors.lbi", "HowDo.lbi"] #set $refsList = $List.toList($hrefs) ! #set $titles = ["About OpenDoors", "How Do I..."] #set $titlesList = $List.toList($titles) --- 6,13 ---- ## create arrays and then create more powerful list structures ## available for manipulation by the list tool: ! #set $hrefs = ["../servlet/HelloWorld", "../servlet/GuestBook","../servlet/CheckConfig","../servlet/Standalone","../servlet/SandBox"] #set $refsList = $List.toList($hrefs) ! #set $titles = ["Hello World", "Guest Book","Check Webmacro Configuration","Standalone","Sand Box"] #set $titlesList = $List.toList($titles) |
From: Tim P <ti...@us...> - 2008-03-19 23:22:35
|
Update of /cvsroot/webmacro/webmacro/examples/advanced In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv1914/examples/advanced Modified Files: list.tml Log Message: Correct comment Index: list.tml =================================================================== RCS file: /cvsroot/webmacro/webmacro/examples/advanced/list.tml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** list.tml 27 Sep 2005 05:45:17 -0000 1.2 --- list.tml 19 Mar 2008 23:22:30 -0000 1.3 *************** *** 1,3 **** ! <!-- helptoc.tml --> ## Provides the control for listing help files in a separate window ## Requires $org.webmacro.servlet.ListTool to be in the context --- 1,3 ---- ! <!-- list.tml --> ## Provides the control for listing help files in a separate window ## Requires $org.webmacro.servlet.ListTool to be in the context |
From: Tim P <ti...@us...> - 2008-03-19 20:08:08
|
Update of /cvsroot/webmacro/webmacro/src/org/webmacro/util In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv20288/src/org/webmacro/util Modified Files: Clock.java Log Message: Checkstyle: utility classes should not have default constructors Index: Clock.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/src/org/webmacro/util/Clock.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Clock.java 16 Jul 2003 06:45:00 -0000 1.6 --- Clock.java 19 Mar 2008 20:08:05 -0000 1.7 *************** *** 29,32 **** --- 29,33 ---- * This is an optimization. "System.currentTimeMillis()" is a relatively * slow method, and "new Date()" is an incredibly expensive operation. + * * Update: System.ctm is no longer all that slow; replaced with a version * that caches the Date but not the time. *************** *** 35,45 **** { /** ! * Every tick interval the following variable is updated with the current system time */ static public long TIME = System.currentTimeMillis(); /** ! * Date information */ private static Date date = new Date(); --- 36,51 ---- { + /** Disallow instantiation. */ + private Clock() + { + } + /** ! * Every tick interval the following variable is updated with the current system time. */ static public long TIME = System.currentTimeMillis(); /** ! * Date information. */ private static Date date = new Date(); |
From: Tim P <ti...@us...> - 2008-03-19 20:04:51
|
Update of /cvsroot/webmacro/webmacro/src/org/webmacro/servlet In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv18836/src/org/webmacro/servlet Modified Files: Servlet22Broker.java Log Message: Eclipse: missing javadoc return Index: Servlet22Broker.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/src/org/webmacro/servlet/Servlet22Broker.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Servlet22Broker.java 31 Oct 2005 02:46:41 -0000 1.14 --- Servlet22Broker.java 19 Mar 2008 20:04:44 -0000 1.15 *************** *** 148,163 **** /** * Get an existing instance of the Servlet 2.2 broker or create a new one. * Templates will be retrieved relative to the ServletContext root ! * and classes loaded from the ClassLoader passed in. NOTE: Templates ! * will <b>not</b> be loaded from the classpath. * @param sc The ServletContext to template access * @param cl The ClassLoader for class loading, typically servlet or ! * JSP page's class loader * @param additionalProperties * @param fromServlet true if it is actually an initialization derived from ! * a Servlet instance passed in - just for nicer logging output * @param servletOrContextName Name of the servlet or context originating this broker, ! * for nicer logging ! * @return * @throws org.webmacro.InitException * @since 2.1 --- 148,166 ---- /** * Get an existing instance of the Servlet 2.2 broker or create a new one. + * * Templates will be retrieved relative to the ServletContext root ! * and classes loaded from the ClassLoader passed in. ! * ! * NOTE: Templates will <b>not</b> be loaded from the classpath. ! * * @param sc The ServletContext to template access * @param cl The ClassLoader for class loading, typically servlet or ! * JSP page's class loader * @param additionalProperties * @param fromServlet true if it is actually an initialization derived from ! * a Servlet instance passed in - just for nicer logging output * @param servletOrContextName Name of the servlet or context originating this broker, ! * for nicer logging ! * * @throws org.webmacro.InitException * @since 2.1 *************** *** 199,203 **** /** ! * Get a resource (file) from the the Broker's class loader */ public URL getResource (String name) --- 202,206 ---- /** ! * Get a resource (file) from the the Broker's class loader. */ public URL getResource (String name) *************** *** 245,249 **** /** ! * Get a resource (file) from the Broker's class loader */ public InputStream getResourceAsStream (String name) --- 248,252 ---- /** ! * Get a resource (file) from the Broker's class loader. */ public InputStream getResourceAsStream (String name) *************** *** 259,263 **** /** * Get a template; kind of like getting a resource, but might come ! * from a different place */ public URL getTemplate (String name) --- 262,266 ---- /** * Get a template; kind of like getting a resource, but might come ! * from a different place. */ public URL getTemplate (String name) *************** *** 275,280 **** * Loads a class by name. Uses the servlet classloader to load the * class. If the class is not found uses the Broker classForName ! * implementation. */ ! public Class classForName (String name) throws ClassNotFoundException { --- 278,283 ---- * Loads a class by name. Uses the servlet classloader to load the * class. If the class is not found uses the Broker classForName ! * implementation. ! */ public Class classForName (String name) throws ClassNotFoundException { |
From: Tim P <ti...@us...> - 2008-03-19 19:56:37
|
Update of /cvsroot/webmacro/webmacro/src/org/webmacro/engine In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14307/src/org/webmacro/engine Modified Files: EvaluationExceptionHandler.java Log Message: Checkstyle: missing javadoc Index: EvaluationExceptionHandler.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/src/org/webmacro/engine/EvaluationExceptionHandler.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** EvaluationExceptionHandler.java 12 Jun 2003 00:47:45 -0000 1.4 --- EvaluationExceptionHandler.java 19 Mar 2008 19:56:33 -0000 1.5 *************** *** 43,51 **** import org.webmacro.util.Settings; public interface EvaluationExceptionHandler { /** ! * Initialize the EEH */ public void init (Broker b, Settings config); --- 43,57 ---- import org.webmacro.util.Settings; + /** + * Handler for Exceptions generated during property evaluation. + * + * @since 0.96 + * + */ public interface EvaluationExceptionHandler { /** ! * Initialize the EEH. */ public void init (Broker b, Settings config); |
From: Tim P <ti...@us...> - 2008-03-19 19:54:12
|
Update of /cvsroot/webmacro/webmacro/src/org/webmacro/util In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv13493/src/org/webmacro/util Modified Files: LogFile.java Log Message: Checkstyle: whitespace Index: LogFile.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/src/org/webmacro/util/LogFile.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** LogFile.java 31 Oct 2005 02:46:41 -0000 1.14 --- LogFile.java 19 Mar 2008 19:54:07 -0000 1.15 *************** *** 137,141 **** /** ! * Create a new LogFile instance */ public LogFile (PrintStream out) --- 137,141 ---- /** ! * Create a new LogFile instance. */ public LogFile (PrintStream out) *************** *** 182,184 **** } ! } \ No newline at end of file --- 182,184 ---- } ! } |
From: Tim P <ti...@us...> - 2008-03-19 19:53:38
|
Update of /cvsroot/webmacro/webmacro/src/org/webmacro/util In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv13126/src/org/webmacro/util Modified Files: CommonsLoggingTarget.java Log Message: Checkstyle: whitespace Index: CommonsLoggingTarget.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/src/org/webmacro/util/CommonsLoggingTarget.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CommonsLoggingTarget.java 1 Jan 2006 13:27:12 -0000 1.1 --- CommonsLoggingTarget.java 19 Mar 2008 19:53:35 -0000 1.2 *************** *** 26,33 **** { case LogSystem.DEBUG: ! log.debug( message, e); break; case LogSystem.ERROR: ! log.error( message, e); break; case LogSystem.INFO: --- 26,33 ---- { case LogSystem.DEBUG: ! log.debug(message, e); break; case LogSystem.ERROR: ! log.error(message, e); break; case LogSystem.INFO: |
From: Tim P <ti...@us...> - 2008-03-19 17:25:22
|
Update of /cvsroot/webmacro/webmacro/src/org/webmacro/resource In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv20111/src/org/webmacro/resource Modified Files: CachingProvider.java Log Message: Checkstyle: organise imports Index: CachingProvider.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/src/org/webmacro/resource/CachingProvider.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** CachingProvider.java 12 Jun 2003 00:47:47 -0000 1.19 --- CachingProvider.java 19 Mar 2008 17:25:18 -0000 1.20 *************** *** 24,28 **** package org.webmacro.resource; ! import org.webmacro.*; import org.webmacro.util.Settings; --- 24,32 ---- package org.webmacro.resource; ! import org.webmacro.Broker; ! import org.webmacro.InitException; ! import org.webmacro.Log; ! import org.webmacro.Provider; ! import org.webmacro.ResourceException; import org.webmacro.util.Settings; *************** *** 112,116 **** } ! /* * Delegates to ResourceLoader implementers the load operation * by casting the query as a string and invoking the --- 116,120 ---- } ! /** * Delegates to ResourceLoader implementers the load operation * by casting the query as a string and invoking the |
From: Tim P <ti...@us...> - 2008-03-19 17:09:32
|
Update of /cvsroot/webmacro/webmacro/src/org/webmacro/engine In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv13846/src/org/webmacro/engine Modified Files: DefaultEvaluationExceptionHandler.java Log Message: Checkstyle: move javadoc to correct place Index: DefaultEvaluationExceptionHandler.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/src/org/webmacro/engine/DefaultEvaluationExceptionHandler.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** DefaultEvaluationExceptionHandler.java 12 Jun 2003 00:47:45 -0000 1.12 --- DefaultEvaluationExceptionHandler.java 19 Mar 2008 17:09:28 -0000 1.13 *************** *** 22,25 **** --- 22,33 ---- + package org.webmacro.engine; + + import org.webmacro.Broker; + import org.webmacro.Context; + import org.webmacro.Log; + import org.webmacro.PropertyException; + import org.webmacro.util.Settings; + /** * DefaultEvaluationExceptionHandler *************** *** 35,46 **** */ - package org.webmacro.engine; - - import org.webmacro.Broker; - import org.webmacro.Context; - import org.webmacro.Log; - import org.webmacro.PropertyException; - import org.webmacro.util.Settings; - public class DefaultEvaluationExceptionHandler implements EvaluationExceptionHandler { --- 43,46 ---- *************** *** 157,159 **** return "<!-- " + errorText + " -->"; } ! } \ No newline at end of file --- 157,159 ---- return "<!-- " + errorText + " -->"; } ! } |