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: <lan...@us...> - 2003-02-07 15:25:15
|
Update of /cvsroot/webmacro/wiki In directory sc8-pr-cvs1:/tmp/cvs-serv4306 Modified Files: build.xml Added Files: FilesDirsToCreateAWiki.txt Log Message: Added specification file of those files which must be modified by a wiki builder and updated those templates and build.xml files to support new wiki creation process. --- NEW FILE: FilesDirsToCreateAWiki.txt --- build.xml resources.jar etc/** htdocs/** templates/footer.wm templates/header.wm templates/login.wm Index: build.xml =================================================================== RCS file: /cvsroot/webmacro/wiki/build.xml,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** build.xml 27 Nov 2002 07:06:31 -0000 1.9 --- build.xml 7 Feb 2003 15:24:41 -0000 1.10 *************** *** 56,67 **** </target> ! <target name="verify.dir.install" unless="dir.install"> ! <fail message="Please define dir.install" /> ! </target> ! <target name="verify.site.name" unless="site.name"> ! <fail message="Please specify the site.name to install" /> ! </target> <target name="install" depends="verify.dir.install,verify.site.name,prepare,compile,jar"> <ant antfile="build.xml" inheritAll="false" --- 56,83 ---- </target> ! <target name="verify.dir.install" unless="dir.install"> ! <fail message="Please define dir.install" /> ! </target> ! <target name="verify.site.name" unless="site.name"> ! <fail message="Please specify the site.name to install" /> ! </target> ! ! <!-- prepares a new site for subsequent install. --> ! <target name="prepareNewWiki" depends="verify.site.name,prepare"> ! <copy todir="builds/${site.name}" overwrite='true'> ! <fileset dir="builds/www.webmacro.org" > ! <includesfile name="FilesDirsToCreateAWiki.txt"/> ! </fileset> ! </copy> ! </target> ! ! <target name="install" depends="verify.dir.install,verify.site.name,prepare,compile,jar"> + <copy todir="builds/${site.name}" overwrite='false'> + <fileset dir="builds/www.webmacro.org" > + <excludesfile name="FilesDirsToCreateAWiki.txt"/> + </fileset> + </copy> <ant antfile="build.xml" inheritAll="false" |
From: <lan...@us...> - 2003-02-07 15:24:54
|
Update of /cvsroot/webmacro/wiki/builds/www.webmacro.org/templates/admin In directory sc8-pr-cvs1:/tmp/cvs-serv4306/builds/www.webmacro.org/templates/admin Modified Files: update_user.wm user_list.wm Log Message: Added specification file of those files which must be modified by a wiki builder and updated those templates and build.xml files to support new wiki creation process. Index: update_user.wm =================================================================== RCS file: /cvsroot/webmacro/wiki/builds/www.webmacro.org/templates/admin/update_user.wm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** update_user.wm 27 Nov 2002 06:21:41 -0000 1.1 --- update_user.wm 7 Feb 2003 15:24:46 -0000 1.2 *************** *** 18,22 **** email: <input type='text' name='email' value='$Text.HTMLEncode($UserToUpdate.Attributes.email)' size=45><br> is moderator? <input type='checkbox' name='moderator' value='true' #if($UserToUpdate.IsModerator){ checked}><p> - All Attributes:<br> #foreach $attribute in $UserToUpdate.Attributes.entrySet() { --- 18,21 ---- Index: user_list.wm =================================================================== RCS file: /cvsroot/webmacro/wiki/builds/www.webmacro.org/templates/admin/user_list.wm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** user_list.wm 27 Nov 2002 06:21:41 -0000 1.1 --- user_list.wm 7 Feb 2003 15:24:46 -0000 1.2 *************** *** 13,17 **** #set $prefix=$User.Attribute.LastUserListLetter #if ($Form.PREFIX) { #set $prefix="$Form.PREFIX" } ! #const $abc = "*ABCDEFGIJKLMNOPQRSTUVWXYZ" #foreach $letter in $abc.toCharArray() indexing $i from 0 { --- 13,17 ---- #set $prefix=$User.Attribute.LastUserListLetter #if ($Form.PREFIX) { #set $prefix="$Form.PREFIX" } ! #set $abc = "*ABCDEFGIJKLMNOPQRSTUVWXYZ" #foreach $letter in $abc.toCharArray() indexing $i from 0 { |
From: <lan...@us...> - 2003-02-07 15:24:53
|
Update of /cvsroot/webmacro/wiki/builds/www.webmacro.org/templates In directory sc8-pr-cvs1:/tmp/cvs-serv4306/builds/www.webmacro.org/templates Modified Files: header.wm webmacro.wm Log Message: Added specification file of those files which must be modified by a wiki builder and updated those templates and build.xml files to support new wiki creation process. Index: header.wm =================================================================== RCS file: /cvsroot/webmacro/wiki/builds/www.webmacro.org/templates/header.wm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** header.wm 15 Oct 2001 06:36:20 -0000 1.1 --- header.wm 7 Feb 2003 15:24:46 -0000 1.2 *************** *** 1,4 **** #set $Response.ContentType = "text/html" - #if ($Page) #set $PageName = $Page.Title --- 1,4 ---- + ## www.webmacro.org/header.wm #set $Response.ContentType = "text/html" #if ($Page) #set $PageName = $Page.Title *************** *** 39,43 **** <td class="HeaderLeft" valign=middle nowrap width="40"> ! <a href="WebMacro" title="WebMacro Homepage"><img align=middle src=images/fish-small.gif width=48 height=44 border=0></a> </td> <td class="HeaderLeft" valign=top nowrap><span class="PageTitle"> </span></td> --- 39,43 ---- <td class="HeaderLeft" valign=middle nowrap width="40"> ! <a href="WebMacro" title="WebMacro Homepage"><img align=middle src=images/logo-small.gif width=48 height=44 border=0></a> </td> <td class="HeaderLeft" valign=top nowrap><span class="PageTitle"> </span></td> Index: webmacro.wm =================================================================== RCS file: /cvsroot/webmacro/wiki/builds/www.webmacro.org/templates/webmacro.wm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** webmacro.wm 15 Oct 2001 06:36:20 -0000 1.1 --- webmacro.wm 7 Feb 2003 15:24:46 -0000 1.2 *************** *** 60,64 **** <td width=15></td> <td valign=middle nowrap> ! <img src="images/fish-normal.gif" border=0 alt="[Fish]" align=absmiddle> <span class="BringTogether">Bring it Together with WebMacro</span> --- 60,64 ---- <td width=15></td> <td valign=middle nowrap> ! <img src="images/logo-normal.gif" border=0 alt="[Fish]" align=absmiddle> <span class="BringTogether">Bring it Together with WebMacro</span> |
From: <lan...@us...> - 2003-02-07 15:20:30
|
Update of /cvsroot/webmacro/wiki/builds/www.webmacro.org/htdocs/images In directory sc8-pr-cvs1:/tmp/cvs-serv2896 Added Files: logo-normal.gif logo-small.gif Log Message: The fish logos renamed. --- NEW FILE: logo-normal.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: logo-small.gif --- (This appears to be a binary file; contents omitted.) |
From: <lan...@us...> - 2003-02-07 15:19:34
|
Update of /cvsroot/webmacro/wiki/builds/www.webmacro.org/htdocs/images In directory sc8-pr-cvs1:/tmp/cvs-serv2228 Removed Files: fish-normal.gif fish-small.gif fishy.gif Log Message: images/fish*.* replaced in favor of images/logo*.* for portability to new sites. --- fish-normal.gif DELETED --- --- fish-small.gif DELETED --- --- fishy.gif DELETED --- |
From: <lan...@us...> - 2003-02-07 15:13:35
|
Update of /cvsroot/webmacro/wiki/builds/help In directory sc8-pr-cvs1:/tmp/cvs-serv31941 Modified Files: README Added Files: CreatingAWikiSite.pdf CreatingAWikiSite.sxw Log Message: Documentation to aid in WIKI site generation. --- NEW FILE: CreatingAWikiSite.pdf --- (This appears to be a binary file; contents omitted.) --- NEW FILE: CreatingAWikiSite.sxw --- (This appears to be a binary file; contents omitted.) Index: README =================================================================== RCS file: /cvsroot/webmacro/wiki/builds/help/README,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** README 13 Oct 2001 20:42:13 -0000 1.1 --- README 7 Feb 2003 15:13:31 -0000 1.2 *************** *** 1,38 **** ! General ! ======== ! This tree contains the wiki resources for building a help space. This site ! contains authored pages as well as templates designed for help. ! ! cvs Site Description ! ==================== ! htdocs/ ! htdocs/images ! Static html pages which are not mutable, the site style file, ! site-stye.css, and the images for the help site under the images directory. ! ! templates/ ! The templates used for running the site. ! ! etc/ ! This is the directory where you will find the most leverage in editing. ! It contains the values used in the templates, the site style file, and ! formatting control. Each property file in etc/ serves a specific purpose and ! each file should be edited by the designer responsible for creating the kind of ! look and feel deemed compatible with other sub-sites. ! ! VLH-1998/ ! This directory contains a default page, WikiHelp, and a default user, ! admin, with a password, 99ducks. Other default pages can be added under ! ! VLH-1998/Pages-help ! You may additional pages to this directory as pre-authored pages. ! ! VLH-1998/Users-help ! You may add additional users to this as pre-authorized users in addition ! to admin. ! ! ! ! ! are the templates for building the help space. ! --- 1,30 ---- ! General ! ======== ! This tree contains the wiki resources for building a help space. This site ! contains authored pages as well as templates designed for help. The primary source for documentation on how to build a wiki is CreatingAWikiSite.pdf in this directory. ! ! cvs Site Description relative to builds/www.webmacro.org ! ========================================== ! htdocs/ ! htdocs/images ! site-stye.css ! Static html pages which are not mutable, the site style file, , and the images for the site under the images directory. ! ! templates/ ! The templates used for running the site. See CreatingAWikiSite.pdf. ! ! etc/ ! This is the directory where you will find the most leverage in editing. ! It contains the values used in the templates, the site style file, and formatting control. Each property file in etc/ serves a specific purpose and each file should be edited by the designer responsible for creating the kind of look and feel deemed compatible with other sub-sites. ! ! VLH-1998/ ! This directory contains a default page, WikiHelp, and a default user, ! admin, with a password, 99ducks. Other default pages can be added under ! ! VLH-1998/Pages-help ! You may additional pages to this directory as pre-authored pages. ! ! VLH-1998/Users-help ! You may add additional users to this as pre-authorized users in addition ! to admin. Are the templates for building the help space. ! |
From: <dr...@us...> - 2003-01-29 04:25:51
|
Update of /cvsroot/webmacro/webmacro/src/org/webmacro/servlet In directory sc8-pr-cvs1:/tmp/cvs-serv26319/src/org/webmacro/servlet Modified Files: WMServlet.java Log Message: For better or worse.... remove "final" modifier from all methods. Index: WMServlet.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/src/org/webmacro/servlet/WMServlet.java,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** WMServlet.java 10 Nov 2002 20:35:08 -0000 1.52 --- WMServlet.java 29 Jan 2003 04:25:48 -0000 1.53 *************** *** 84,88 **** * @exception ServletException if it failed to initialize */ ! final public synchronized void init(ServletConfig sc) throws ServletException { super.init(sc); --- 84,88 ---- * @exception ServletException if it failed to initialize */ ! public synchronized void init(ServletConfig sc) throws ServletException { super.init(sc); *************** *** 96,100 **** * is called just after the broker is initialized. */ ! final public synchronized void init() { if (_started) { --- 96,100 ---- * is called just after the broker is initialized. */ ! public synchronized void init() { if (_started) { *************** *** 161,165 **** * will be called just before the broker is shut down. */ ! final public synchronized void destroy() { stop(); _log.notice("stopped: " + this); --- 161,165 ---- * will be called just before the broker is shut down. */ ! public synchronized void destroy() { stop(); _log.notice("stopped: " + this); *************** *** 173,177 **** * Check whether or not the broker we are using has been shut down */ ! final public boolean isDestroyed() { return _wm.isDestroyed(); } --- 173,177 ---- * Check whether or not the broker we are using has been shut down */ ! public boolean isDestroyed() { return _wm.isDestroyed(); } *************** *** 310,314 **** * @param error a string explaining what went wrong */ ! final protected Template error(WebContext context, String error) { Template tmpl = null; //Handler hand = new ErrorHandler(); --- 310,314 ---- * @param error a string explaining what went wrong */ ! protected Template error(WebContext context, String error) { Template tmpl = null; //Handler hand = new ErrorHandler(); *************** *** 333,337 **** * be in a shutdown state or else null. */ ! final public Broker getBroker() { // this method can be unsynch. because the broker manages its own // state, plus the only time the _broker will be shutdown or null --- 333,337 ---- * be in a shutdown state or else null. */ ! public Broker getBroker() { // this method can be unsynch. because the broker manages its own // state, plus the only time the _broker will be shutdown or null *************** *** 349,353 **** * the type of messages you intend to write to this Log. */ ! final public Log getLog(String type, String description) { return _broker.getLog(type, description); } --- 349,353 ---- * the type of messages you intend to write to this Log. */ ! public Log getLog(String type, String description) { return _broker.getLog(type, description); } *************** *** 358,362 **** * type. The type will be used as the description. */ ! final public Log getLog(String type) { return _broker.getLog(type, type); } --- 358,362 ---- * type. The type will be used as the description. */ ! public Log getLog(String type) { return _broker.getLog(type, type); } *************** *** 368,372 **** * @exception ResourceException if the template coult not be loaded */ ! final public Template getTemplate(String key) throws ResourceException { return _wm.getTemplate(key); --- 368,372 ---- * @exception ResourceException if the template coult not be loaded */ ! public Template getTemplate(String key) throws ResourceException { return _wm.getTemplate(key); *************** *** 379,383 **** * The content will be returned as an Object. */ ! final public String getURL(String url) throws ResourceException { return _wm.getURL(url); --- 379,383 ---- * The content will be returned as an Object. */ ! public String getURL(String url) throws ResourceException { return _wm.getURL(url); *************** *** 390,394 **** * @exception NotFoundException could not locate requested information */ ! final public String getConfig(String key) throws NotFoundException { return _wm.getConfig(key); --- 390,394 ---- * @exception NotFoundException could not locate requested information */ ! public String getConfig(String key) throws NotFoundException { return _wm.getConfig(key); *************** *** 399,403 **** * Return specified default if key could not be found */ ! final public String getConfig(String key, String defaultValue) { try { return _wm.getConfig(key); --- 399,403 ---- * Return specified default if key could not be found */ ! public String getConfig(String key, String defaultValue) { try { return _wm.getConfig(key); *************** *** 411,415 **** * Create a new Context object */ ! final public Context getContext() { return _wm.getContext(); } --- 411,415 ---- * Create a new Context object */ ! public Context getContext() { return _wm.getContext(); } *************** *** 418,422 **** * Create a new WebContext object */ ! final public WebContext getWebContext(HttpServletRequest req, HttpServletResponse res) { return _wm.getWebContext(req, res); } --- 418,422 ---- * Create a new WebContext object */ ! public WebContext getWebContext(HttpServletRequest req, HttpServletResponse res) { return _wm.getWebContext(req, res); } *************** *** 490,494 **** * stream. */ ! final protected void execute(Template tmpl, WebContext c) throws IOException { FastWriter fw = null; --- 490,494 ---- * stream. */ ! protected void execute(Template tmpl, WebContext c) throws IOException { FastWriter fw = null; *************** *** 781,783 **** } ! } --- 781,783 ---- } ! } \ No newline at end of file |
From: <lan...@us...> - 2003-01-10 16:50:20
|
Update of /cvsroot/webmacro/webmacro/test In directory sc8-pr-cvs1:/tmp/cvs-serv10271/test Modified Files: build.xml Log Message: test and macro updates Index: build.xml =================================================================== RCS file: /cvsroot/webmacro/webmacro/test/build.xml,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** build.xml 30 Nov 2002 23:56:33 -0000 1.8 --- build.xml 10 Jan 2003 16:49:45 -0000 1.9 *************** *** 74,77 **** --- 74,78 ---- <batchtest fork="yes" todir="${unit.reports}"> <fileset dir="${unit.root}" includes="**/TestParseInclude.java" /> + <fileset dir="${unit.root}" includes="**/TestSiteBuilder.java" /> </batchtest> </junit> |
From: <lan...@us...> - 2003-01-10 16:50:20
|
Update of /cvsroot/webmacro/webmacro/macros/html In directory sc8-pr-cvs1:/tmp/cvs-serv10271/macros/html Modified Files: all.wmm formControls.wmm frames.wmm Log Message: test and macro updates Index: all.wmm =================================================================== RCS file: /cvsroot/webmacro/webmacro/macros/html/all.wmm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** all.wmm 21 Dec 2002 07:30:20 -0000 1.2 --- all.wmm 10 Jan 2003 16:49:43 -0000 1.3 *************** *** 5,6 **** --- 5,7 ---- #include as macro "html/frames.wmm" #include as macro "html/formControls.wmm" + #include as macro "html/menuStyles.wmm" Index: formControls.wmm =================================================================== RCS file: /cvsroot/webmacro/webmacro/macros/html/formControls.wmm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** formControls.wmm 21 Dec 2002 07:30:20 -0000 1.1 --- formControls.wmm 10 Jan 2003 16:49:45 -0000 1.2 *************** *** 61,64 **** --- 61,80 ---- } + ## textInput(textData, formatProps) where: + ## arg1 corresponds to the data + ## arg2 provides format values for the text + ## Formats a choice using radio button controls + #macro textInput($textData, $formatProps) { + <INPUT TYPE="TEXT" + MAXLENGTH="textData.maxChars" + NAME="textData.name" + SIZE="$formatProps.charLength" + VALUE="textData.value" + > + } + + + + ## dateControl(dateValues, formatProps) where: ## arg1 corresponds to the values for the date control Index: frames.wmm =================================================================== RCS file: /cvsroot/webmacro/webmacro/macros/html/frames.wmm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** frames.wmm 21 Dec 2002 01:06:55 -0000 1.1 --- frames.wmm 10 Jan 2003 16:49:45 -0000 1.2 *************** *** 17,24 **** onClick= "window.open( ! '$urlProps.url', 'popup', 'resizable=$scriptProps.resizeable,toolbar=no,status=no,location=no,scrollbars=yes,width=$scriptProps.width,height=$scriptProps.height,screenX=0,screenY=0,alwaysRaised=yes')"> ! $urlProps.visibleContent</a> } --- 17,24 ---- onClick= "window.open( ! '$urlProps.hrefOnly', 'popup', 'resizable=$scriptProps.resizeable,toolbar=no,status=no,location=no,scrollbars=yes,width=$scriptProps.width,height=$scriptProps.height,screenX=0,screenY=0,alwaysRaised=yes')"> ! $urlProps.hrefLabel</a> } |
From: <lan...@us...> - 2003-01-10 16:49:51
|
Update of /cvsroot/webmacro/webmacro/test/unit/org/webmacro/template In directory sc8-pr-cvs1:/tmp/cvs-serv10271/test/unit/org/webmacro/template Modified Files: controlsTest.wm href.wm Log Message: test and macro updates Index: controlsTest.wm =================================================================== RCS file: /cvsroot/webmacro/webmacro/test/unit/org/webmacro/template/controlsTest.wm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** controlsTest.wm 21 Dec 2002 07:30:20 -0000 1.1 --- controlsTest.wm 10 Jan 2003 16:49:47 -0000 1.2 *************** *** 93,96 **** --- 93,97 ---- #set $formatProps.closeWindow=false #set $formatProps.imageAlign="bottom" + #set $formatProps.charLength="40" } Index: href.wm =================================================================== RCS file: /cvsroot/webmacro/webmacro/test/unit/org/webmacro/template/href.wm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** href.wm 21 Dec 2002 01:06:55 -0000 1.1 --- href.wm 10 Jan 2003 16:49:48 -0000 1.2 *************** *** 8,13 **** #bean $System = "java.lang.System" scope=static #bean $urlProps = "org.webmacro.util.SparseProperties" scope=page onNew { ! #set $urlProps.url = "winFrame.html" ! #set $urlProps.visibleContent = "Click Me To See A Pop-Up Window" } ## set all the javascript props --- 8,13 ---- #bean $System = "java.lang.System" scope=static #bean $urlProps = "org.webmacro.util.SparseProperties" scope=page onNew { ! #set $urlProps.hrefOnly = "winFrame.html" ! #set $urlProps.hrefLabel = "Click Me To See A Pop-Up Window" } ## set all the javascript props |
From: <dr...@us...> - 2003-01-10 00:15:43
|
Update of /cvsroot/webmacro/wiki/src/org/tcdi/opensource/wiki/directive In directory sc8-pr-cvs1:/tmp/cvs-serv31579 Added Files: WikiDirective.java Log Message: Adding a WikiDirective (#wiki) into wiki's code base. It seems to work. Can use it like this: #set $name = "World" #wiki { Hello, *$name* } --- NEW FILE: WikiDirective.java --- /* * Created by IntelliJ IDEA. * User: e_ridge * Date: Jan 9, 2003 * Time: 6:13:49 PM * To change template for new class use * Code Style | Class Templates options (Tools | IDE Options). */ package org.tcdi.opensource.wiki.directive; import org.webmacro.directive.Directive; import org.webmacro.directive.DirectiveDescriptor; import org.webmacro.directive.DirectiveBuilder; import org.webmacro.engine.BuildContext; import org.webmacro.engine.BuildException; import org.webmacro.engine.Block; import org.webmacro.FastWriter; import org.webmacro.Context; import org.webmacro.PropertyException; import org.webmacro.*; import org.tcdi.opensource.wiki.renderer.WikiURLRenderer; import org.tcdi.opensource.wiki.renderer.WikiPageRenderer; import org.tcdi.opensource.wiki.parser.WikiParser; import org.tcdi.opensource.wiki.builder.WikiPageBuilder; import org.tcdi.opensource.wiki.builder.DefaultPageBuilder; import org.tcdi.opensource.wiki.WikiTermMatcher; import org.tcdi.opensource.wiki.WikiPage; import java.io.IOException; import java.util.Map; import java.util.Collections; import java.util.HashMap; import java.lang.reflect.Constructor; /** * <b>#wiki { }</b> -- render an expanded WebMacro block as a WikiPage.<p> * * Using a user-specified <code>WikiPageRenderer</code> (configured via WebMacro.properties), * renders a block of text as a Wiki page. Example:<pre> * * #set $name = "Eric Ridge" * #wiki { * Hello, *$name* * } * * </pre> * * The above will output:<pre> * * Hello, <b>Eric Ridge</> * * </pre> * * * You can configure custom WikiPage- and WikiURL-Renderers to be used by this directive by * modifying your custom <code>WebMacro.properties</code> file:<pre> * * wiki.PageRenderer = com.mycompany.wiki.MyWikiPageRenderer * wiki.URLRenderer = com.mycompany.wiki.MyWikiURLRenderer * * </pre> * * Note that the default values for the above configuration settings are:<pre> * * wiki.PageRenderer = org.tcdi.opensource.wiki.renderer.HTMLPageRenderer * wiki.URLRenderer = org.tcdi.opensource.wiki.renderer.HTMLURLRenderer * * </pre> * * The default settings will give you Wiki-->HTML rendering capabilities. If you prefer plain text * instead of HTML, you can use:<pre> * * wiki.PageRenderer = org.tcdi.opensource.wiki.renderer.TextPageRenderer * wiki.URLRenderer = org.tcdi.opensource.wiki.renderer.TextURLRenderer * * </pre> * * @author Eric B. Ridge (mailto:eb...@tc...) * @version 1.0 */ public class WikiDirective extends Directive { private static final int WIKI_BODY = 1; private static final Directive.ArgDescriptor[] _args = new Directive.ArgDescriptor[] { new Directive.BlockArg(WIKI_BODY), }; private static final DirectiveDescriptor _desc = new DirectiveDescriptor("wiki", null, _args, null); public static DirectiveDescriptor getDescriptor() { return _desc; } /** a static cache of WikiPageRenderers that have been used. */ private static final Map _rendererCache = Collections.synchronizedMap(new HashMap()); private static final WikiTermMatcher _wikiTermMatcher = new WikiTermMatcher () { // the #wiki directive is only for text formatting. It doesn't // actually understand SmashedTogetherWords public boolean isWikiTermReference(String word) { return false; } }; /** the body of text to evaluate/expand, then parse as Wiki text */ private Macro _body; /** the renderer we'll use. comes from _wikiCache */ private WikiPageRenderer _renderer; public Object build(DirectiveBuilder builder, BuildContext bc) throws BuildException { // The WikiPageRenderer to use is configurable via WebMacro.properties // if it's not found, we'll use a default renderer: org.tcdi.opensource.wiki.renderer.HTMLPageRenderer String pageRendererClassname = bc.getBroker().getSettings().getSetting("wiki.PageRenderer", "org.tcdi.opensource.wiki.renderer.HTMLPageRenderer"); // if it hasn't already been done, // create and cache the page renderer _renderer = (WikiPageRenderer) _rendererCache.get(pageRendererClassname); if (_renderer == null) { try { // the WikiURLRenderer is also configurable via WebMacro.properties // if not specified, use the default url renderer: org.tcdi.opensource.wiki.renderer.HTMLURLRenderer String urlRendererClassname = bc.getBroker().getSettings().getSetting("wiki.URLRenderer", "org.tcdi.opensource.wiki.renderer.HTMLURLRenderer"); _renderer = createPageRenderer (bc.getBroker(), pageRendererClassname, createURLRenderer (bc.getBroker(), urlRendererClassname)); _rendererCache.put(pageRendererClassname, _renderer); } catch (Exception e) { throw new BuildException("Unable to create url or page renderer", e); } } _body = (Block) builder.getArg(WIKI_BODY, bc); return this; } /** * Evaluate/Expand our block of text and returned the Wiki-rendered output as * a java.lang.String. */ public Object evaluate(Context context) throws PropertyException { FastWriter fw = FastWriter.getInstance(context.getBroker()); String text; // first, expand the body of this directive into a String // so that a) all WebMacro #directives and $variables are recognized // and b) we can parse the output as Wiki text try { _body.write(fw, context); } catch (Exception e) { throw new PropertyException ("Unable to expand body", e); } text = fw.toString(); // we use the WikiParser and the DefaultPageBuilder here // to parse and build a WikiPage that we'll soon render // using the renderer specified in WM's configuration WikiParser parser = new WikiParser (new java.io.StringReader(text)); WikiPageBuilder builder = new DefaultPageBuilder (_wikiTermMatcher); WikiPage page; try { page = parser.parse(builder); } catch (org.tcdi.opensource.wiki.parser.ParseException e) { throw new PropertyException ("Unable to parse body into a WikiPage.", e); } // finally, render the WikiPage object into some kind of text form // using the configured renderer try { return _renderer.render(page); } catch (org.tcdi.opensource.wiki.renderer.HTMLPageRenderer.RenderException e) { throw new PropertyException ("Unable to render WikiPage using " + _renderer.getClass().getName()); } } /** * Here we evaluate and expand our block into a plain text String. This string is then * parsed and re-formatted using the configured WikiPageRenderer. It is this wiki-formatted * block of text that gets written to the FastWriter. */ public void write(FastWriter fastWriter, Context context) throws PropertyException, IOException { fastWriter.write(evaluate(context).toString()); } // // private methods // /** dynamically create a WikiURLRenderer. Locates the Class by using a WebMacro Broker */ private static final WikiURLRenderer createURLRenderer (Broker b, String classname) throws Exception { return (WikiURLRenderer) b.classForName(classname).newInstance(); } /** dynamically create a WikiPageRenderer. Locates the Class by using a WebMacro Broker */ private static final WikiPageRenderer createPageRenderer (Broker b, String classname, WikiURLRenderer urlRenderer) throws Exception { Class pageRendererClass = b.classForName(classname); Constructor ctor = pageRendererClass.getConstructor(new Class[] { WikiURLRenderer.class}); return (WikiPageRenderer) ctor.newInstance (new Object[] { urlRenderer}); } } |
From: <dr...@us...> - 2003-01-10 00:14:51
|
Update of /cvsroot/webmacro/wiki/src/org/tcdi/opensource/wiki/directive In directory sc8-pr-cvs1:/tmp/cvs-serv31453/directive Log Message: Directory /cvsroot/webmacro/wiki/src/org/tcdi/opensource/wiki/directive added to the repository |
From: <dr...@us...> - 2003-01-08 23:31:10
|
Update of /cvsroot/webmacro/webmacro/src/org/webmacro/directive In directory sc8-pr-cvs1:/tmp/cvs-serv1278/src/org/webmacro/directive Modified Files: IncludeDirective.java Log Message: Attempting to fix strange logic problems w/ #include Index: IncludeDirective.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/src/org/webmacro/directive/IncludeDirective.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** IncludeDirective.java 15 Dec 2002 10:22:36 -0000 1.19 --- IncludeDirective.java 8 Jan 2003 23:31:07 -0000 1.20 *************** *** 25,28 **** --- 25,30 ---- import java.io.*; import java.util.*; + import java.net.URL; + import java.net.URLConnection; import org.webmacro.*; *************** *** 476,506 **** */ protected String getFile(Broker b, String name) throws PropertyException { ! try { ! return b.get("url", name).toString(); ! } ! catch (ResourceException re) { ! try { try { ! // The UrlProvider knows, how to do this, ! // so let him do the work for us ! return b.get("url", name).toString(); ! } ! catch (NullPointerException npe) { ! throw npe; } ! catch (Exception e) { ! throw makePropertyException("Found by Broker, but could not be retrieved", e); } ! } ! catch (NullPointerException npe) { ! throw makePropertyException("Not found by url provider or broker"); ! } ! catch (Exception e) { ! throw makePropertyException("Unexpected exception while getting from Broker", e); ! } ! } ! catch (Exception e) { ! throw makePropertyException("Unexpected exception while getting from url provider", e); ! } } --- 478,520 ---- */ protected String getFile(Broker b, String name) throws PropertyException { ! try { ! // first, ask the URL provider (if we have one) to find the file for us ! return b.get("url", name).toString(); ! } ! catch (Exception e) { ! // for whatever reason, the URL provider couldn't find the file ! // (maybe we don't have a URL provider?). No matter, directly ! // ask the Broker to load it as a resource ! URL url = null; ! try { ! url = b.getResource(name); ! if (url == null) // doh! the Broker couldn't find it either. Guess it doesn't exist ! throw makePropertyException("Resource not found by URL provider or Broker"); ! ! // open a URLConnection... ! URLConnection conn = url.openConnection(); ! StringBuffer sb = new StringBuffer (); ! InputStream in = conn.getInputStream(); ! String enc = conn.getContentEncoding(); ! if (enc == null) ! enc = b.getSetting("TemplateEncoding"); ! ! // ...and stream the contents of the URL into a String ! int cnt=0; ! byte[] buff = new byte[4096]; ! while ( (cnt = in.read(buff)) > 0) { ! sb.append (new String (buff, 0, cnt, enc)); ! } ! in.close(); ! ! // return the string form of the resource. ! // This is what will be included in the template ! return sb.toString(); } ! catch (IOException ioe) { ! throw makePropertyException("Error streaming file from: " + url, ioe); } ! } } |
From: <dr...@us...> - 2003-01-07 06:30:34
|
Update of /cvsroot/webmacro/webmacro/test/unit/org/webmacro In directory sc8-pr-cvs1:/tmp/cvs-serv27876/test/unit/org/webmacro Modified Files: TestVersion.java Log Message: fix the TestVersion unit test to correctly test the BUILD_DATE of WebMacro. Copy-n-paste can be a bad bad thing. Index: TestVersion.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/test/unit/org/webmacro/TestVersion.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TestVersion.java 27 Nov 2002 04:18:58 -0000 1.2 --- TestVersion.java 7 Jan 2003 06:30:30 -0000 1.3 *************** *** 29,33 **** public void testBuildDate() throws Exception { ! assert (!WebMacro.VERSION.equals("@BUILD_DATE")); } } --- 29,33 ---- public void testBuildDate() throws Exception { ! assert (!WebMacro.BUILD_DATE.equals("@BUILD_DATE@")); } } |
From: <dr...@us...> - 2003-01-04 21:51:45
|
Update of /cvsroot/webmacro/webmacro/distroot In directory sc8-pr-cvs1:/tmp/cvs-serv13530/distroot Modified Files: RELEASE-NOTES Log Message: updated docs and such for 1.1final release Index: RELEASE-NOTES =================================================================== RCS file: /cvsroot/webmacro/webmacro/distroot/RELEASE-NOTES,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** RELEASE-NOTES 21 Dec 2002 17:52:27 -0000 1.19 --- RELEASE-NOTES 4 Jan 2003 21:51:42 -0000 1.20 *************** *** 1,9 **** ! WebMacro 1.1b3 --------------- ! This is the third in a series of Beta releases for WebMacro 1.1. WM 1.1 includes ! new features such as #macro, #count, $functions(), and various bugfixes. ! WebMacro is alive, and this release is proof! The best place for information about WebMacro is our website: --- 1,10 ---- ! WebMacro 1.1final --------------- ! This is WebMacro 1.1. ! WM 1.1 includes new features such as #macro, #count, $functions(), and numerous bugfixes. ! ! WebMacro is alive, and this production quality release is proof! The best place for information about WebMacro is our website: *************** *** 21,24 **** --- 22,34 ---- ----------------------- + - Fix for Tomcat and template loading from .jar files (Sebastian) + + - Fix NPE's when calling methods using the 'null' keyword + + - Add .tmpl as a recognized template file extension for #parse and #include + + Changes prior to this Release + ----------------------------- + - cleanup to various error messages (eric) *************** *** 35,43 **** - WebMacro.properties settings for default FastWriter buffer size and max pool size (eric) - - - - Changes Prior to this Release - ----------------------------- - more documentation concerning new features (brian, keats, lane) --- 45,48 ---- |
From: <dr...@us...> - 2003-01-04 21:51:45
|
Update of /cvsroot/webmacro/webmacro In directory sc8-pr-cvs1:/tmp/cvs-serv13530 Modified Files: build.xml Log Message: updated docs and such for 1.1final release Index: build.xml =================================================================== RCS file: /cvsroot/webmacro/webmacro/build.xml,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** build.xml 15 Dec 2002 10:26:01 -0000 1.31 --- build.xml 4 Jan 2003 21:51:42 -0000 1.32 *************** *** 41,45 **** </target> ! <property name="version" value="1.1b3" /> <property name="app.name" value="webmacro" /> <property name="tmpdir" value="tmp" /> --- 41,45 ---- </target> ! <property name="version" value="1.1final" /> <property name="app.name" value="webmacro" /> <property name="tmpdir" value="tmp" /> |
From: <dr...@us...> - 2003-01-03 17:38:19
|
Update of /cvsroot/webmacro/webmacro In directory sc8-pr-cvs1:/tmp/cvs-serv26278 Modified Files: WebMacro.defaults Log Message: add .tmpl as an automagic "as template" file extension for #parse/#include Index: WebMacro.defaults =================================================================== RCS file: /cvsroot/webmacro/webmacro/WebMacro.defaults,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** WebMacro.defaults 20 Dec 2002 02:01:49 -0000 1.35 --- WebMacro.defaults 3 Jan 2003 17:38:13 -0000 1.36 *************** *** 244,249 **** # #include is used without qualifing the # file type. By convention wmm is for WM macro library files. ! include.TemplateExtensions: .wm, .wmt, .tml, .wmm ! parse.TemplateExtensions: .wm, .wmt, .tml, .wmm --- 244,249 ---- # #include is used without qualifing the # file type. By convention wmm is for WM macro library files. ! include.TemplateExtensions: .wm, .wmt, .tml, .tmpl, .wmm ! parse.TemplateExtensions: .wm, .wmt, .tml, .tmpl, .wmm |
From: <dr...@us...> - 2003-01-03 17:05:10
|
Update of /cvsroot/webmacro/webmacro/src/org/webmacro/engine In directory sc8-pr-cvs1:/tmp/cvs-serv11804/src/org/webmacro/engine Modified Files: ListBuilder.java Log Message: fix a NullPointerException when "null" is used as an argument to a method Index: ListBuilder.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/src/org/webmacro/engine/ListBuilder.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ListBuilder.java 11 Jun 2002 17:43:21 -0000 1.10 --- ListBuilder.java 3 Jan 2003 17:05:07 -0000 1.11 *************** *** 93,97 **** sb.append(", "); } ! sb.append(_content[i].toString()); } sb.append(")"); --- 93,97 ---- sb.append(", "); } ! sb.append(_content[i] == null ? "null" : _content[i].toString()); } sb.append(")"); |
From: <ska...@us...> - 2002-12-27 23:36:41
|
Update of /cvsroot/webmacro/webmacro/src/org/webmacro/servlet In directory sc8-pr-cvs1:/tmp/cvs-serv15635/src/org/webmacro/servlet Modified Files: Servlet22Broker.java Log Message: fixed issues with loading resources from classpath that start with a slash. Was already fixed in v1_0 branch but somehow did not get into into HEAD Index: Servlet22Broker.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/src/org/webmacro/servlet/Servlet22Broker.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Servlet22Broker.java 11 Jun 2002 17:43:22 -0000 1.9 --- Servlet22Broker.java 27 Dec 2002 23:36:37 -0000 1.10 *************** *** 132,147 **** public URL getResource(String name) { try { ! // NOTE: Tomcat4 needs a leading '/'. ! // If this doesn't work with your 2.2+ container, try commenting out the following line ! if (!name.startsWith("/")) name = "/" + name; ! URL u = _servletContext.getResource(name); if (u != null && u.getProtocol().equals("file")) { ! File f = new File(u.getFile()); ! if (!f.exists()) ! u = null; } ! if (u == null) u = _servletClassLoader.getResource(name); ! if (u == null) u = super.getResource(name); return u; --- 132,158 ---- public URL getResource(String name) { try { ! // NOTE: Tomcat4 needs a leading '/'. ! // However, when loading resources from the class-loader, they ! // may _not_ start with a leading '/'. So we have to build ! // up two different names. Ugly! ! String contextName = name; ! if (name.startsWith("/")) { ! name = name.substring(1); ! } else { ! StringBuffer b = new StringBuffer(name.length()+1); ! b.append("/"); ! b.append(name); ! contextName = b.toString(); ! } ! URL u = _servletContext.getResource(contextName); if (u != null && u.getProtocol().equals("file")) { ! File f = new File(u.getFile()); ! if (!f.exists()) ! u = null; } ! if (u == null) { u = _servletClassLoader.getResource(name); ! } ! if (u == null) u = super.getResource(name); return u; |
From: <ska...@us...> - 2002-12-27 23:36:41
|
Update of /cvsroot/webmacro/webmacro/src/org/webmacro/resource In directory sc8-pr-cvs1:/tmp/cvs-serv15635/src/org/webmacro/resource Modified Files: ClassPathTemplateLoader.java Log Message: fixed issues with loading resources from classpath that start with a slash. Was already fixed in v1_0 branch but somehow did not get into into HEAD Index: ClassPathTemplateLoader.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/src/org/webmacro/resource/ClassPathTemplateLoader.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ClassPathTemplateLoader.java 11 Jun 2002 17:43:22 -0000 1.5 --- ClassPathTemplateLoader.java 27 Dec 2002 23:36:37 -0000 1.6 *************** *** 59,67 **** // It isn't clear from the javadocs, whether ClassLoader.getResource() ! // needs a starting slash, so won't add one at the moment. this.path = config; } public Template load(String query, CacheElement ce) throws ResourceException { URL url = loader.getResource(path.concat(query)); if (url != null && log.loggingDebug()) { --- 59,75 ---- // It isn't clear from the javadocs, whether ClassLoader.getResource() ! // needs a starting slash, so won't add one at the moment. Even worse, ! // most class-loaders require you to _not have_ a slash, so we'll ! // remove it, if it exists ! if (config.startsWith("/")) { ! config = config.substring(1); ! } this.path = config; } public Template load(String query, CacheElement ce) throws ResourceException { + if (query.startsWith("/")) { + query = query.substring(1); + } URL url = loader.getResource(path.concat(query)); if (url != null && log.loggingDebug()) { |
From: <dr...@us...> - 2002-12-21 17:52:30
|
Update of /cvsroot/webmacro/webmacro/distroot In directory sc8-pr-cvs1:/tmp/cvs-serv14271/distroot Modified Files: RELEASE-NOTES Log Message: fixing up the release notes for 1.1b3 release Index: RELEASE-NOTES =================================================================== RCS file: /cvsroot/webmacro/webmacro/distroot/RELEASE-NOTES,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** RELEASE-NOTES 15 Dec 2002 10:26:01 -0000 1.18 --- RELEASE-NOTES 21 Dec 2002 17:52:27 -0000 1.19 *************** *** 2,6 **** --------------- ! This is the second in a series of Beta releases for WebMacro 1.1. WM 1.1 includes new features such as #macro, #count, $functions(), and various bugfixes. --- 2,6 ---- --------------- ! This is the third in a series of Beta releases for WebMacro 1.1. WM 1.1 includes new features such as #macro, #count, $functions(), and various bugfixes. *************** *** 30,33 **** --- 30,39 ---- - avoid exception throwing in ContextTool creation (keats) + + - more #macro's (lane) + + - WebMacro.properties settings for default FastWriter buffer size and + max pool size (eric) + |
From: <lan...@us...> - 2002-12-21 07:43:10
|
Update of /cvsroot/webmacro/webmacro/test/unit/org/webmacro/template In directory sc8-pr-cvs1:/tmp/cvs-serv9157/test/unit/org/webmacro/template Modified Files: TestParseInclude.java Added Files: controlsTest.wm Log Message: macro updates --- NEW FILE: controlsTest.wm --- #comment { formtest.wm A template to test form control formatting. } #include as macro "allmacros.wmm" ## set up some useful test data for the url properties and the javascript properties #bean $System = "java.lang.System" scope=static ## choice sample data #bean $option1 = "org.webmacro.util.SparseProperties" scope=page onNew { #set $option1.value = "100" #set $option1.label = "Eric Ridge" } #bean $option2 = "org.webmacro.util.SparseProperties" scope=page onNew { #set $option2.value = "101" #set $option2.label = "Brian Goetz" } #bean $option3 = "org.webmacro.util.SparseProperties" scope=page onNew { #set $option3.value = "102" #set $option3.label = "Lane Sharman" } #bean $optionData = "org.webmacro.util.SparseProperties" scope=page onNew { #set $optionData.options = [$option1, $option2, $option3] #set $optionData.selectedOption = "101" #set $optionData.name = "WebMacroVeterans" } ## date data: #bean $day1 = "org.webmacro.util.SparseProperties" scope=page onNew { #set $day1.label=1 } #bean $day2 = "org.webmacro.util.SparseProperties" scope=page onNew { #set $day2.label=2 } #bean $month1 = "org.webmacro.util.SparseProperties" scope=page onNew { #set $month1.value=1 #set $month1.label="Jan" } #bean $month2 = "org.webmacro.util.SparseProperties" scope=page onNew { #set $month2.value=2 #set $month2.label="Feb" } #bean $year1 = "org.webmacro.util.SparseProperties" scope=page onNew { #set $year1.label=2002 } #bean $year2 = "org.webmacro.util.SparseProperties" scope=page onNew { #set $year2.label=2003 } #bean $date = "org.webmacro.util.SparseProperties" scope=page onNew { #set $date.dayName= "jobStartDay" #set $date.days=[$day1,$day2] #set $date.monthName = "jobStartMonth" #set $date.months = [$month1,$month2] #set $date.yearName = "jobStartYear" #set $date.years = [$year1,$year2] } ## some button elements #bean $action1 = "org.webmacro.util.SparseProperties" scope=page onNew { #set $action1.name = "com.job.Start" #set $action1.value = "Start Job" } #bean $action2 = "org.webmacro.util.SparseProperties" scope=page onNew { #set $action2.name = "com.job.Finish" #set $action2.value = "Finish Job" } #bean $actionData = "org.webmacro.util.SparseProperties" scope=page onNew { #set $actionData.actions = [$action1, $action2] } ## some image button elements #bean $action21 = "org.webmacro.util.SparseProperties" scope=page onNew { #set $action21.name = "com.job.Start" #set $action21.url = "http://webmacro.org/images/fish-normal.gif" } #bean $action22 = "org.webmacro.util.SparseProperties" scope=page onNew { #set $action22.name = "com.job.Finish" #set $action22.url = "http://sourceforge.net/sflogo.php?group_id=64597&type=1" } #bean $actionImgData = "org.webmacro.util.SparseProperties" scope=page onNew { #set $actionImgData.actions = [$action21, $action22] } ## format property hash #bean $formatProps = "org.webmacro.util.SparseProperties" scope=page onNew { #set $formatProps.type="multiple" #set $formatProps.size=2 #set $formatProps.euro=true #set $formatProps.closeWindow=false #set $formatProps.imageAlign="bottom" } ## now create the content. <html> <form> <center> Form Control, Select List, Single or Multiple: <p> #choiceList($optionData, $formatProps) </p> Form Control, Radio Choice: <p> #choiceRadio($optionData, $formatProps) </p> Date Control: <p> #dateControl($date, $formatProps) </p> Form Action Buttons: <p> #buttonAction($actionData, $formatProps) </p> Form Image Action Buttons: <p> #buttonImageAction($actionImgData, $formatProps) </p> </center> </form> </html> Index: TestParseInclude.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/test/unit/org/webmacro/template/TestParseInclude.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** TestParseInclude.java 21 Dec 2002 01:06:55 -0000 1.8 --- TestParseInclude.java 21 Dec 2002 07:30:20 -0000 1.9 *************** *** 119,122 **** --- 119,129 ---- } + /** executes out of the standard macro/ distribution: html. */ + public void testControlsMacro() throws Exception { + // execute the pay pal eCommerce test case and store the output + String value = executeFileTemplate("org/webmacro/template/controlsTest.wm"); + store(System.getProperty("user.dir") + "/" + "controls.html", value); + } + |
From: <lan...@us...> - 2002-12-21 07:42:50
|
Update of /cvsroot/webmacro/webmacro/macros/html In directory sc8-pr-cvs1:/tmp/cvs-serv9157/macros/html Modified Files: all.wmm Added Files: formControls.wmm Log Message: macro updates --- NEW FILE: formControls.wmm --- #comment { formControls.wmm Macros for formatting urls and windows using java script } ## choiceList(optionData, formatProps) where: ## arg1 corresponds to the data ## arg2 provides format values as to type of list #macro choiceList($optionData, $formatProps) { <select name=$optionData.name $formatProps.type size="$formatProps.size"> #foreach $option in $optionData.options { <option #if ($option.value != ""){ value="$option.value"} #if ($optionData.selectedOption == "$option.value") { selected}> $option.label </option> } </select> } ## choiceRadio(optionData, formatProps) where: ## arg1 corresponds to the data ## arg2 provides format values as to type of list ## Formats a choice using radio button controls #macro choiceRadio($optionData, $formatProps) { #foreach $option in $optionData.options { <input type="radio" name="$optionData.name" #if ($option.value != ""){ value="$option.value"} #if ($optionData.selectedOption == "$option.value") { checked }> $option.label } } ## buttonAction(actionData, formatProps) where: ## arg1 corresponds to the data ## arg2 provides format values as to type of list ## Formats a choice using radio button controls #macro buttonAction($actionData, $formatProps) { #foreach $action in $actionData.actions { <input #if ($formatProps.closeWindow) { onClick="window.close()" } type=submit name="$action.name" value="$action.value"> } } ## buttonImageAction(actionData, formatProps) where: ## arg1 corresponds to the data ## arg2 provides format values as to type of list ## Formats a choice using radio button controls #macro buttonImageAction($actionData, $formatProps) { #foreach $action in $actionData.actions { <INPUT TYPE="IMAGE" ALIGN="$formatProps.imageAlign" NAME="$action.name" SRC="$action.url" > } } ## dateControl(dateValues, formatProps) where: ## arg1 corresponds to the values for the date control ## arg2 provides formatting options for the date control. #macro dateControl($dateValues, $formatProps) { #if ($formatProps.euro) { <select name=$dateValues.dayName> #foreach $day in $dateValues.days { <option #if ($day.value != ""){ value="$day.value"} #if ($optionData.selectedOption == "$day.value") { selected } >$day.label</option> } </select> - <select name=$dateValues.monthName> #foreach $month in $dateValues.months { <option #if ($month.value != ""){ value="$month.value"} #if ($optionData.selectedOption == "$month.value") { selected } >$month.label</option> } </select> - } #else { <select name=$dateValues.monthName> #foreach $month in $dateValues.months { <option #if ($month.value != ""){ value="$month.value"} #if ($optionData.selectedOption == "$month.value") { selected } >$month.label</option> } </select> - <select name=$dateValues.dayName> #foreach $day in $dateValues.days { <option #if ($day.value != ""){ value="$day.value"} #if ($optionData.selectedOption == "$day.value") { selected } >$day.label</option> } </select> - } <select name=$dateValues.yearName> #foreach $year in $dateValues.years { <option #if ($year.value != ""){ value="$year.value"} #if ($optionData.selectedOption == "$year.value") { selected } >$year.label</option> } </select> } Index: all.wmm =================================================================== RCS file: /cvsroot/webmacro/webmacro/macros/html/all.wmm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** all.wmm 21 Dec 2002 01:06:55 -0000 1.1 --- all.wmm 21 Dec 2002 07:30:20 -0000 1.2 *************** *** 4,5 **** --- 4,6 ---- } #include as macro "html/frames.wmm" + #include as macro "html/formControls.wmm" |
From: <lan...@us...> - 2002-12-21 01:07:00
|
Update of /cvsroot/webmacro/webmacro/macros/html In directory sc8-pr-cvs1:/tmp/cvs-serv12896/macros/html Added Files: all.wmm frames.wmm Log Message: macro additions --- NEW FILE: all.wmm --- #comment { html/all.wmm Includes all wm macros in the html directory. } #include as macro "html/frames.wmm" --- NEW FILE: frames.wmm --- #comment { frames.wmm Macros for formatting urls and windows using java script } ## hrefInWindow(urlProps, scriptProps) where: ## arg1 corresponds to properties of the url ## arg2 corresponds to formatting properties of the href request ## depending on the values of the arguments, will output an href request ## formatted for a pop-up window. Optionally, you will reference ## a url that spits the window into 2 frames. (See below). #macro hrefInWindow($urlProps, $scriptProps) { <a href= "javascript: popup.open(); popup.focus();" onClick= "window.open( '$urlProps.url', 'popup', 'resizable=$scriptProps.resizeable,toolbar=no,status=no,location=no,scrollbars=yes,width=$scriptProps.width,height=$scriptProps.height,screenX=0,screenY=0,alwaysRaised=yes')"> $urlProps.visibleContent</a> } ## splitWindow()(contentProps, frameProps) where: ## arg1 corresponds to the content properties ## arg2 corresponds to formmatting properties of the window and frame ## depending on the arguments formats content for viewing ## in a framed window which is closeable. #macro closeableWindow($contentProps, $frameProps) { <html> <head> <title>$contentProps.title</title> <meta http-equiv="Content-Type" content="text/html; "> </head> <frameset rows="*,$frameProps.bottomSize" frameborder="$frameProps.borderEnabled" border="$frameProps.borderSize" framespacing="$frameProps.spacing"> <frame name="top" src="$contentProps.top"> <frame name="bottom" src="$contentProps.bottom"> </frameset> </html> } |
From: <lan...@us...> - 2002-12-21 01:07:00
|
Update of /cvsroot/webmacro/webmacro/test/unit/org/webmacro/template In directory sc8-pr-cvs1:/tmp/cvs-serv12896/test/unit/org/webmacro/template Modified Files: TestParseInclude.java Added Files: frame.wm href.wm Log Message: macro additions --- NEW FILE: frame.wm --- #comment { frame.wm A template to excercise frame formatting. } #include as macro "allmacros.wmm" ## set up some useful data for the transaction. ## see the paypalSetup macro for the property name specs. #bean $System = "java.lang.System" scope=static #bean $contentProps = "org.webmacro.util.SparseProperties" scope=page onNew { #set $contentProps.title = "A Pop Up Window" #set $contentProps.top = "http://www.webmacro.org/EricRidge" #set $contentProps.bottom = "close.html" } ## set all the tran properties #bean $frameProps = "org.webmacro.util.SparseProperties" scope=page onNew { #set $frameProps.bottomSize = "50" #set $frameProps.borderEnabled = "yes" #set $frameProps.borderSize = "1" #set $frameProps.spacing = "1" } ## now create the content. #closeableWindow($contentProps, $frameProps) --- NEW FILE: href.wm --- #comment { href.wm A template to excercise href formatting. } #include as macro "allmacros.wmm" ## set up some useful test data for the url properties and the javascript properties #bean $System = "java.lang.System" scope=static #bean $urlProps = "org.webmacro.util.SparseProperties" scope=page onNew { #set $urlProps.url = "winFrame.html" #set $urlProps.visibleContent = "Click Me To See A Pop-Up Window" } ## set all the javascript props #bean $scriptProps = "org.webmacro.util.SparseProperties" scope=page onNew { #set $scriptProps.resizeable = "yes" #set $scriptProps.width = "500" #set $scriptProps.height = "700" } ## now create the content. <html> <center> Content generation: <p> #hrefInWindow($urlProps, $scriptProps) </p></center> </html> Index: TestParseInclude.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/test/unit/org/webmacro/template/TestParseInclude.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** TestParseInclude.java 25 Nov 2002 23:55:25 -0000 1.7 --- TestParseInclude.java 21 Dec 2002 01:06:55 -0000 1.8 *************** *** 104,107 **** --- 104,122 ---- } + + /** executes out of the standard macro/ distribution: html. */ + public void testHrefMacro() throws Exception { + // execute the pay pal eCommerce test case and store the output + String value = executeFileTemplate("org/webmacro/template/href.wm"); + store(System.getProperty("user.dir") + "/" + "windows.html", value); + } + + /** executes out of the standard macro/ distribution: html. */ + public void testFrameMacro() throws Exception { + // execute the pay pal eCommerce test case and store the output + String value = executeFileTemplate("org/webmacro/template/frame.wm"); + store(System.getProperty("user.dir") + "/" + "winFrame.html", value); + } + |