You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(5) |
Nov
(68) |
Dec
(77) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(75) |
Feb
(84) |
Mar
(89) |
Apr
(96) |
May
(52) |
Jun
(73) |
Jul
(99) |
Aug
(46) |
Sep
(40) |
Oct
(46) |
Nov
(45) |
Dec
(25) |
2004 |
Jan
(13) |
Feb
(74) |
Mar
(40) |
Apr
(18) |
May
(31) |
Jun
(1) |
Jul
(16) |
Aug
(1) |
Sep
(21) |
Oct
(19) |
Nov
(10) |
Dec
(16) |
2005 |
Jan
(4) |
Feb
(12) |
Mar
(46) |
Apr
(33) |
May
(64) |
Jun
(1) |
Jul
(60) |
Aug
(31) |
Sep
(26) |
Oct
(24) |
Nov
(37) |
Dec
(10) |
2006 |
Jan
(3) |
Feb
(31) |
Mar
(122) |
Apr
(22) |
May
(4) |
Jun
|
Jul
|
Aug
(2) |
Sep
(4) |
Oct
(8) |
Nov
(3) |
Dec
|
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(3) |
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
(8) |
From: <Web...@St...> - 2005-08-08 13:07:33
|
On Fri, 29 Jul 2005, Lane Sharman wrote: | WM Faithful, | | I am undertaking Release 2 work. Nice! | I would like the release to be 2.1. Why? Where did 2.0 go?? Endre. |
From: Marc P. <ma...@an...> - 2005-08-05 10:46:46
|
Hi, I've hit upon what I believe is an obscure bug in #eval/#templet in 2.0 RC1. I'm finding it with my JSP taglib but I don't believe it is specific to the taglib, it smells more like a problem with #templet/eval. Of course a unit test will prove this so that will naturally be my next course of action. However I can't commit to WM from my workplace. ...evaluating this template: <html> <body> #templet $render Value is: $value #end #templet $outerTemplet #set $value = "Hello!" #eval $rendertemplet using { "value" : $value } #end #eval $outerTemplet using { "rendertemplet" : $render } </body> </html> ...the intention/expectation is that this will simply output: <html> <body> Value is: Hello! </body> </html> ...but, rather weirdly, you get this: <html> <body> Value is: <!-- Attempted to write an undefined variable: Hello! at render:4.11 --> </body> </html> Notice that it says undefined variable "Hello!" - but that is the value of the variable! It's like it's trying to recursively evaluate it. Keats - any thoughts? I will try to dig into the source and write a unit test for this, but I wanted to flag it in case I'm being stupid. Also, there seems to be an error handling bug. If your innermost templet references a non-existent variable, you get something like: Value is: <!-- Attempted to write an undefined variable: <!-- Attempted to write an undefined variable: $iknowthisdoesntexistvalue at unknown:2.58 --> at render:4.11 --> ...notice that this has two error messages and unbalanced "-->" so you get some nasty output in the page and interestingly two sources - unknown and render. Also note that it gets the error variable name right in this case, but in the first problem I talked about it uses the -value- of the variable as the "unknown" variable name. Very confusing! Cheers |
From: Marc P. <ma...@an...> - 2005-08-04 10:29:56
|
> Hi > > We have a simple plugin that we use with webmacro and intellij 4. It > highlights text and gives a macros panel that you can use to jump to > macro definitions. > It's pretty basic but we find it very useful. > > I'm happy to donate it and the sourcecode to the community. YES PLEASE! IntelliJ IDEA rocks (we should be applying for the free open source licenses for the core WM developers..... <g>). I have in the past setup basic syntax highlighting which is better than nothing, but we should do as much as possible to make WM easier to use. We need to seriously consider how to present "WebMacro Extras" to the world - i.e. not core download components but a clear, well-maintained list of extra tools... just like those Velocity people ;-( |
From: Nick S. <NSa...@ms...> - 2005-08-04 08:32:25
|
Hi We have a simple plugin that we use with webmacro and intellij 4. It highlights text and gives a macros panel that you can use to jump to macro definitions. It's pretty basic but we find it very useful. I'm happy to donate it and the sourcecode to the community. Regards Nick >>> web...@pa... 08/04/05 01:05am >>> i would like to help with this... i use eclipse everyday and have to=20 suffer through it using the veloeclipse plugin... i have a cvs server we=20 can start the project up in... i haven't built a plug-in yet and would=20 be interested on how people do it... cheers paul Lane Sharman wrote: > great! I would go for it. It would be great news for the upcoming=20 > release. Just do it!!! >=20 > -Lane >=20 > Dominik wrote: >=20 >>Hy, >>yes I would, but the source is not available, so it might be difficult. >>Perhaps ill contact the author, because it's a sourceforge-project ans so >>has to be opensource. >>=3D=3D >>Greetings >>Dominik=20 >>mailto:do...@db...=20 >> >>-----Urspr=FCngliche Nachricht----- >>Von: web...@li...=20 >>[mailto:web...@li...] Im Auftrag von Lane >>Sharman >>Gesendet: Donnerstag, 28. Juli 2005 18:04 >>An: web...@li...=20 >>Betreff: Re: [WebMacro-user] Eclipse Plugin >> >>Hi Dominik: >> >>Would you consider modifying the velocity plug-in for WM? >> >>-lane >> >>Dominik wrote: >> >> =20 >> >>>Hy, >>>is there a Eclipse Plugin for editing wm files? Im using a pulgin wich >>>parses velocity code, I get a code highlighting at least but as the code of >>>wm and velocity isn't compatible it produces some errors. >>>=3D=3D >>>Greetings >>>Dominik=20 >>>mailto:do...@db...=20 >>> >>> >>> >>>------------------------------------------------------- >>>SF.Net email is sponsored by: Discover Easy Linux Migration Strategies >>> =20 >>> >>>from IBM. Find simple to follow Roadmaps, straightforward articles, >> =20 >> >>>informative Webcasts and more! Get everything you need to get up to >>>speed, fast. http://ads.osdn.com/?ad_id=3D7477&alloc_id=3D16492&op=3Dclick=20 >>>_______________________________________________ >>>Webmacro-user mailing list >>>Web...@li...=20 >>>https://lists.sourceforge.net/lists/listinfo/webmacro-user=20 >>> >>>=20 >>> >>> =20 >>> >> >> =20 >> >=20 > --=20 > Lane Sharman > Providing Private and SPAM-Free Email > http://www.opendoors.com=20 > 858-755-2868 >=20 ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf=20 _______________________________________________ Webmacro-user mailing list Web...@li...=20 https://lists.sourceforge.net/lists/listinfo/webmacro-user=20 This mail has been checked at MSXI for all known virus'. You open this at your own risk. Please make sure all replies are virus free. Also, we do not accept or send attachments of the type exe, vbs, scr or bat due to the increased virus risk they contain. These types of attachments will be stripped from the message. MSXI |
From: Dominik <do...@db...> - 2005-08-04 00:22:36
|
Hy, I finaly got the source-code, but I got the same lac of knowledge than = you: I never wrote any eclipse plugins. My java-skills are quite good, but = not my eclipse.=20 I'll pack the sourcecode of the velocity plugin together and upload it = to a webserver (or is it possible to upload a file at webmacro.net ?). Greetings Dominik -----Original Message----- From: web...@li... [mailto:web...@li...] On Behalf Of paul Sent: Thursday, August 04, 2005 2:05 AM To: web...@li... Subject: Re: AW: [WebMacro-user] Eclipse Plugin i would like to help with this... i use eclipse everyday and have to=20 suffer through it using the veloeclipse plugin... i have a cvs server we = can start the project up in... i haven't built a plug-in yet and would=20 be interested on how people do it... cheers paul Lane Sharman wrote: > great! I would go for it. It would be great news for the upcoming=20 > release. Just do it!!! >=20 > -Lane >=20 > Dominik wrote: >=20 >>Hy, >>yes I would, but the source is not available, so it might be = difficult. >>Perhaps ill contact the author, because it=92s a sourceforge-project = ans so >>has to be opensource. >>=3D=3D >>Greetings >>Dominik=20 >>mailto:do...@db... >> >>-----Urspr=FCngliche Nachricht----- >>Von: web...@li... >>[mailto:web...@li...] Im Auftrag von Lane >>Sharman >>Gesendet: Donnerstag, 28. Juli 2005 18:04 >>An: web...@li... >>Betreff: Re: [WebMacro-user] Eclipse Plugin >> >>Hi Dominik: >> >>Would you consider modifying the velocity plug-in for WM? >> >>-lane >> >>Dominik wrote: >> >> =20 >> >>>Hy, >>>is there a Eclipse Plugin for editing wm files? Im using a pulgin = wich >>>parses velocity code, I get a code highlighting at least but as the = code of >>>wm and velocity isn't compatible it produces some errors. >>>=3D=3D >>>Greetings >>>Dominik=20 >>>mailto:do...@db... >>> >>> >>> >>>------------------------------------------------------- >>>SF.Net email is sponsored by: Discover Easy Linux Migration = Strategies >>> =20 >>> >>>from IBM. Find simple to follow Roadmaps, straightforward articles, >> =20 >> >>>informative Webcasts and more! Get everything you need to get up to >>>speed, fast. = http://ads.osdn.com/?ad_id=3D7477&alloc_id=3D16492&op=3Dclick >>>_______________________________________________ >>>Webmacro-user mailing list >>>Web...@li... >>>https://lists.sourceforge.net/lists/listinfo/webmacro-user >>> >>>=20 >>> >>> =20 >>> >> >> =20 >> >=20 > --=20 > Lane Sharman > Providing Private and SPAM-Free Email > http://www.opendoors.com > 858-755-2868 >=20 ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle = Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & = QA Security * Process Improvement & Measurement * = http://www.sqe.com/bsce5sf _______________________________________________ Webmacro-user mailing list Web...@li... https://lists.sourceforge.net/lists/listinfo/webmacro-user |
From: paul <web...@pa...> - 2005-08-04 00:05:06
|
i would like to help with this... i use eclipse everyday and have to=20 suffer through it using the veloeclipse plugin... i have a cvs server we=20 can start the project up in... i haven't built a plug-in yet and would=20 be interested on how people do it... cheers paul Lane Sharman wrote: > great! I would go for it. It would be great news for the upcoming=20 > release. Just do it!!! >=20 > -Lane >=20 > Dominik wrote: >=20 >>Hy, >>yes I would, but the source is not available, so it might be difficult. >>Perhaps ill contact the author, because it=92s a sourceforge-project an= s so >>has to be opensource. >>=3D=3D >>Greetings >>Dominik=20 >>mailto:do...@db... >> >>-----Urspr=FCngliche Nachricht----- >>Von: web...@li... >>[mailto:web...@li...] Im Auftrag von Lane >>Sharman >>Gesendet: Donnerstag, 28. Juli 2005 18:04 >>An: web...@li... >>Betreff: Re: [WebMacro-user] Eclipse Plugin >> >>Hi Dominik: >> >>Would you consider modifying the velocity plug-in for WM? >> >>-lane >> >>Dominik wrote: >> >> =20 >> >>>Hy, >>>is there a Eclipse Plugin for editing wm files? Im using a pulgin wich >>>parses velocity code, I get a code highlighting at least but as the co= de of >>>wm and velocity isn't compatible it produces some errors. >>>=3D=3D >>>Greetings >>>Dominik=20 >>>mailto:do...@db... >>> >>> >>> >>>------------------------------------------------------- >>>SF.Net email is sponsored by: Discover Easy Linux Migration Strategies >>> =20 >>> >>>from IBM. Find simple to follow Roadmaps, straightforward articles, >> =20 >> >>>informative Webcasts and more! Get everything you need to get up to >>>speed, fast. http://ads.osdn.com/?ad_id=3D7477&alloc_id=3D16492&op=3Dc= lick >>>_______________________________________________ >>>Webmacro-user mailing list >>>Web...@li... >>>https://lists.sourceforge.net/lists/listinfo/webmacro-user >>> >>>=20 >>> >>> =20 >>> >> >> =20 >> >=20 > --=20 > Lane Sharman > Providing Private and SPAM-Free Email > http://www.opendoors.com > 858-755-2868 >=20 |
From: paul <web...@pa...> - 2005-08-03 23:44:36
|
can i serve as a mirror for webmacro.org? i have a dedicated box with a spare half terra byte of bandwidth always up always running... besides i am sure i can use it as some sort of tax write off :-) as you know i still use webmacro today... http://www.spydercomm.com let me know. cheers paul Marc Palmer wrote: > Hmmm thought I sent this already but hasn't shown on list. > > webmacro.org appears down again - Eric? > > I have not been able to reach it since yesterday. > > :( > > > > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click > _______________________________________________ > Webmacro-user mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/webmacro-user |
From: Marc P. <ma...@an...> - 2005-08-03 13:46:15
|
Hmmm thought I sent this already but hasn't shown on list. webmacro.org appears down again - Eric? I have not been able to reach it since yesterday. :( |
From: Marc P. <ma...@an...> - 2005-08-03 13:23:24
|
> Whatever, WebMacro configuration needs to be "bean scriptable". I am > not > suggesting any replacement of the existing properties config scheme for > WM > - but it -must- be possible for users to configurable WebMacro at > runtime, > and from any POJO configuration tool such as Spring, Pico etc. Let me qualify this a bit more - in my "dream" of WM 3 we'd have POJOs that let us configure a WebMacro instance - both initially at startup using somethign like Spring, but also at runtime for non-persistent changes to the config such as temporarily adding a new directive. A Spring bean config XML might look like this: <beans> <bean id="myBusinessLogic" class="com.somecorp.LogicClass"> <property name="datastore" ref="myJDBCstorage"/> </bean> <bean id="myJDBCstorage" class="com.somecorp.JDBCStorageClass"> <property name="datasource" value="java:comp/env/jdbc/TestDB"/> </bean> <bean id="someDirective" class="com.somecorp.SomeDirectiveClass"> <property name="datastore" ref="myJDBCstorage"/> </bean> <bean id="webmacro1" class="org.webmacro.WebMacroConfiguration"> <property name="baseConfiguration" value="file:wm.properties"/> <property name="contextTools"> <map> <entry key="logic" value-ref="myBusinessLogic"> </map> </property> <property name="directives"> <map> <entry key="specialdirective" value-ref="someDirective"> </map> </property> </bean> <bean id="webmacro2" class="org.webmacro.WebMacroConfiguration"> <property name="baseConfiguration" value="file:wm2.properties"/> <property name="contextTools"> <map> <entry key="logic" value-ref="myBusinessLogic"> </map> </property> </bean> <bean id="uiController1" class="com.somecorp.MyUIController"> <property name="webmacro" ref="webmacro1"/> </bean> <bean id="uiController2" class="com.somecorp.MyOtherUIController"> <property name="webmacro" ref="webmacro2"/> </bean> </beans> Now for anyone not familiar with Spring, the above will create a bunch of Java objects (using the "class=" attribute value) calling their default constructors and then will automatically set the properties on those objects including resolving references to other beans within the context, independent of order in the XML file. Anyway, the above shows how simple it would then be to configure WebMacro for a single application that has: * Multiple WM instances, initialized from different config * WM instances initialized with context tools that are configured with references to other configuration-domain objects -without- the use of ugly singletons in your application, or arguably worse JNDI (yes I used a JNDI datasource just to save space...). Remember, those beans referenced by the WM config could be anything, and exist anywhere. Your WM setup / application no longer needs to know. * Wiring of WM instances to other components such as your controllers/actions. This is -great-! It would also be possible to allow configuration of Context "templates" so that whenever WM needs a new context it takes it from a bean factory configured in the Spring XML - thus externalizing this config from WM and most importantly integrating it with Spring applications. Like the XML or not Lane, -lots- of people out there are using Spring and havnig WM non-configurable from it is very ugly indeed, forcing you or end-users to understand and use multiple configuration schemes/tools. It makes WM much less attractive. I haven't checked but I'm pretty sure that Velocity config is Spring friendly. $0.02 :) |
From: Marc P. <ma...@an...> - 2005-08-03 12:41:50
|
Guys, I just looked at the "tutorial" that comes with the WM distros. I've never noticed this before - and it's quite nice. However: 1. it is woefully out of date, especially in terms of the available directives, map syntax etc 2. in my opinion in starts off too far from WM script - start with "Hello world" and then tell them why :) 3. It has no styling 4. It has no TOC. I don't have time now, but for when I do - does anybody have any reason why I shouldn't do some work on those docs to improve them? Ditto the Wiki - it's in a bit of a mess and using WM as an "end user" on site I am noticing lots of holes in the docs / structure of them. Cheers |
From: Marc P. <ma...@an...> - 2005-08-03 12:31:17
|
> > I have pending commits for this. If we are going to skip 2.0 and go > > straight for 2.1 with "early access" Spring and JSP I will commit > this > > stuff tomorrow. > > I would like it if you would commit this stuff right away. Be sure to > add some unit tests. OK I will do this this week. > btw: have you ever thought of just doing a WM Container? In fact, this > might be a really nice subproject because it would show how to run WM > in both standalone and in Web-mode. It's a nice idea, but I have precious little time at the moment. I think a concrete WAR file that you can point at a directory of templates and have it serve the pages is a -must- have for WM though. > Also, I see a limitation with XML property specification ala Spring. > First, I do not like XML as a bean property spec. I would much rather > use #bean to instantiate and set props . Second, it does not allow for > the beans properties to persist in state and then evolve. Fine for the > default settings of a bean. I think you've got the wrong end of the stick here. The Spring bean config stuff is geared at application component initialization (i.e. business logic objects, EJBs - yuck!, etc) Its XML grammar is trivial, and you are not restricted to their XML - you can write any bean factory implementation that uses any file format you like. i.e. you could write a WebMacroBeanFactory for spring that parses WM templates to initialize the bean context. However Spring's XML config is very good because it can be validated using any standard XML validation tool (and as part of the build process) and 99% of the world knows a lot more about XML than WebMacro. Whatever, WebMacro configuration needs to be "bean scriptable". I am not suggesting any replacement of the existing properties config scheme for WM - but it -must- be possible for users to configurable WebMacro at runtime, and from any POJO configuration tool such as Spring, Pico etc. Right now the WM config/context system is not really "POJO". Cheers |
From: Lane S. <la...@op...> - 2005-08-01 22:05:35
|
Hi Keats, If you will put a wiki page on this, I think it will be very nice convenience. If it is good to go and well tested, let's include it in the release, too! Lane Keats Kirsch wrote: > Lane Sharman wrote: > >> Hi Keats, >> >> Do you really want to include this in the pending 2.1 release? > > > I don't really care. Maybe we could include it but not enable it by > default? > >> Have you considered that you now have to document 2 ways to set a >> property, #properties and #set? Will this confuse a new person to >> WebMacro? Is your #property ... a big advantage over #set >> $Object.Property = "foo" > > > I've found it annoying when I have to set more than a couple of > properties. Also it's cool to be able to initialize an object's state > from a properties file. > >> It is certainly a nice convenience. Just not sure that its inclusion >> will improve more than its support and documentation demands will >> warrant. > > > I don't think the documentation is a big issue. I'll put up a Wiki > page. And it's not like WM requires much support these days. I'm not > wedded to this, it's just something that comes in handy for me and > someone else wanted it as well, so I put it out there. > > Thanks for carrying the ball. > > Keats > >> -Lane >> >> >> >> Keats Kirsch wrote: >> >>> I created a new directive called Properties directive. This can be >>> handy if you want to set a bunch of properties on an object within a >>> template; essentially providing a abbreviated, readable syntax. You >>> can also combine it with the #include directive for processing a >>> properties file. (Just be careful of comments: use "##" or "# " to >>> keep them from confusing the parser.) >>> >>> I'm attaching the source and I will commit it to the core if folks >>> agree it is worthy. >>> >>> Here's some test WMScript that illustrates the usage: >>> >>> ## Test using default object: java.util.Properties >>> #set $Name="Keats Kirsch" >>> #set $Age=45 >>> <h3>\#properties test</h3> >>> #properties $p { >>> Name: $Name >>> Age = $Age >>> } >>> My age is $p.Age<br> >>> My name is $p.Name<br> >>> ## Test using a pre-existing POJO (non-map) >>> <h3>More \#properties</h3> >>> #bean $Cal="java.util.Calendar" scope=static >>> #set $GCal=$Cal.Instance >>> Today: $GCal.Time, FirstDayOfWeek: $GCal.FirstDayOfWeek, Lenient: >>> $GCal.Lenient >>> <br> >>> #properties $GCal { >>> FirstDayOfWeek=0 >>> Lenient=false >>> } >>> Today: $GCal.Time, FirstDayOfWeek: $GCal.FirstDayOfWeek, Lenient: >>> $GCal.Lenient >>> <br> >>> >>> ------------------------------------------------------------------------ >>> >>> > > > > > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click > _______________________________________________ > Webmacro-user mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/webmacro-user > -- Lane Sharman Providing Private and SPAM-Free Email http://www.opendoors.com 858-755-2868 |
From: Keats K. <ke...@xa...> - 2005-08-01 02:40:37
|
Lane Sharman wrote: > Hi Keats, > > Do you really want to include this in the pending 2.1 release? I don't really care. Maybe we could include it but not enable it by default? > Have you considered that you now have to document 2 ways to set a > property, #properties and #set? Will this confuse a new person to > WebMacro? Is your #property ... a big advantage over #set > $Object.Property = "foo" I've found it annoying when I have to set more than a couple of properties. Also it's cool to be able to initialize an object's state from a properties file. > It is certainly a nice convenience. Just not sure that its inclusion > will improve more than its support and documentation demands will warrant. I don't think the documentation is a big issue. I'll put up a Wiki page. And it's not like WM requires much support these days. I'm not wedded to this, it's just something that comes in handy for me and someone else wanted it as well, so I put it out there. Thanks for carrying the ball. Keats > -Lane > > > > Keats Kirsch wrote: > >> I created a new directive called Properties directive. This can be >> handy if you want to set a bunch of properties on an object within a >> template; essentially providing a abbreviated, readable syntax. You >> can also combine it with the #include directive for processing a >> properties file. (Just be careful of comments: use "##" or "# " to >> keep them from confusing the parser.) >> >> I'm attaching the source and I will commit it to the core if folks >> agree it is worthy. >> >> Here's some test WMScript that illustrates the usage: >> >> ## Test using default object: java.util.Properties >> #set $Name="Keats Kirsch" >> #set $Age=45 >> <h3>\#properties test</h3> >> #properties $p { >> Name: $Name >> Age = $Age >> } >> My age is $p.Age<br> >> My name is $p.Name<br> >> ## Test using a pre-existing POJO (non-map) >> <h3>More \#properties</h3> >> #bean $Cal="java.util.Calendar" scope=static >> #set $GCal=$Cal.Instance >> Today: $GCal.Time, FirstDayOfWeek: $GCal.FirstDayOfWeek, Lenient: >> $GCal.Lenient >> <br> >> #properties $GCal { >> FirstDayOfWeek=0 >> Lenient=false >> } >> Today: $GCal.Time, FirstDayOfWeek: $GCal.FirstDayOfWeek, Lenient: >> $GCal.Lenient >> <br> >> >>------------------------------------------------------------------------ >> |
From: Lane S. <la...@op...> - 2005-08-01 02:01:48
|
see below Marc Palmer wrote: > Lane Sharman wrote: > >> WM Faithful, >> >> I am undertaking Release 2 work. I would like the release to be 2.1. >> >> Also, eric, please get the webmacro.org site back up and announce >> this to the group. As soon as this is done, I would like respective >> authors of their pages to go in and refresh those pages. >> >> Also, I would strongly urge that a bridge between WM and Spring be >> completed. This is really important because Spring is a useful >> container for application execution and it supports different add-on >> tools. The people who have expressed interest here should do the >> logical thing: get an IM session running, describe the work, and, >> just do it. > > > I have pending commits for this. If we are going to skip 2.0 and go > straight for 2.1 with "early access" Spring and JSP I will commit this > stuff tomorrow. I would like it if you would commit this stuff right away. Be sure to add some unit tests. btw: have you ever thought of just doing a WM Container? In fact, this might be a really nice subproject because it would show how to run WM in both standalone and in Web-mode. Also, I see a limitation with XML property specification ala Spring. First, I do not like XML as a bean property spec. I would much rather use #bean to instantiate and set props . Second, it does not allow for the beans properties to persist in state and then evolve. Fine for the default settings of a bean. I have done a lot of work over the years with property modeling and it drives me crazy to see static XML machinery for initializing beans. A WM init script using #bean would and is such a cleaner way: #if ($Store.AppParams == null) { $AppParams = #defaultParameters("AppParams") } #else { $AppParams = $Store.AppParams } is so much more readable then a bunch of angle bracket statements and proprietary type definitions. I am so tired of learning yet another XML type schema. Don't get me wrong though. Spring is a significant improvement over J2EE containers! -Lane > > The WM Spring code I have is simply a conversion of the Velocity > Spring view for WM. There is an outstanding issue in that Velocity > supports a "spring.vm" macro that is on the classpath in spring.jar > and you can pull it in from any template as just "spring.vm" I > believe. We can't do this easily as far as I can see, as we need to > modify the WM config from within the Spring view code, which means > overriding any webmacro.properties etc. > > ...which is why for WM 2.5 or 3 I am committed to overhauling the core > configuration, Broker and resource handling stuff so that it is > bean-like, not singletons, and therefore IoC/DI friendly. > > Keats and I haven't merged our ideas on the JSP taglib yet. I will get > to this this week. > > Cheers -- Lane Sharman Providing Private and SPAM-Free Email http://www.opendoors.com 858-755-2868 |
From: Lane S. <la...@op...> - 2005-08-01 00:59:52
|
Hi Keats, Do you really want to include this in the pending 2.1 release? Have you considered that you now have to document 2 ways to set a property, #properties and #set? Will this confuse a new person to WebMacro? Is your #property ... a big advantage over #set $Object.Property = "foo" It is certainly a nice convenience. Just not sure that its inclusion will improve more than its support and documentation demands will warrant. -Lane Keats Kirsch wrote: > I created a new directive called Properties directive. This can be > handy if you want to set a bunch of properties on an object within a > template; essentially providing a abbreviated, readable syntax. You > can also combine it with the #include directive for processing a > properties file. (Just be careful of comments: use "##" or "# " to > keep them from confusing the parser.) > > I'm attaching the source and I will commit it to the core if folks > agree it is worthy. > > Here's some test WMScript that illustrates the usage: > > ## Test using default object: java.util.Properties > #set $Name="Keats Kirsch" > #set $Age=45 > <h3>\#properties test</h3> > #properties $p { > Name: $Name > Age = $Age > } > My age is $p.Age<br> > My name is $p.Name<br> > ## Test using a pre-existing POJO (non-map) > <h3>More \#properties</h3> > #bean $Cal="java.util.Calendar" scope=static > #set $GCal=$Cal.Instance > Today: $GCal.Time, FirstDayOfWeek: $GCal.FirstDayOfWeek, Lenient: > $GCal.Lenient > <br> > #properties $GCal { > FirstDayOfWeek=0 > Lenient=false > } > Today: $GCal.Time, FirstDayOfWeek: $GCal.FirstDayOfWeek, Lenient: > $GCal.Lenient > <br> > >------------------------------------------------------------------------ > >/* > * Copyright (C) 2005 Semiotek Inc. All Rights Reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted under the terms of either of the following > * Open Source licenses: > * > * The GNU General Public License, version 2, or any later version, as > * published by the Free Software Foundation > * (http://www.fsf.org/copyleft/gpl.html); > * > * or > * > * The Semiotek Public License (http://webmacro.org/LICENSE.) > * > * This software is provided "as is", with NO WARRANTY, not even the > * implied warranties of fitness to purpose, or merchantability. You > * assume all risks and liabilities associated with its use. > * > * See www.webmacro.org for more information on the WebMacro project. > */ > >package org.webmacro.directive; > >import org.webmacro.*; >import org.webmacro.engine.BuildContext; >import org.webmacro.engine.BuildException; >import org.webmacro.engine.StringTemplate; >import org.webmacro.engine.Variable; >import org.webmacro.servlet.TextTool; > >import java.io.IOException; >import java.util.Hashtable; > >/* > * > * @author Keats Kirsch > * Set properties on an object using Java properties file type syntax > * > */ >public class PropertiesDirective extends Directive >{ > > private static final String DEFAULT_CLASS_NAME = "java.util.Hashtable"; > private static final int PROPS_TARGET = 1; > private static final int PROPS_CLASS = 2; > private static final int PROPS_CLASSNAME = 3; > private static final int PROPS_RESULT = 4; > > private Variable target; > private Object result; > private String _className; > //private boolean asMacro = false; > > private static final ArgDescriptor[] myArgs = > new ArgDescriptor[] { > new LValueArg(PROPS_TARGET), > new OptionalGroup(3), > new KeywordArg(PROPS_CLASS, "class"), > new AssignmentArg(), > new QuotedStringArg(PROPS_CLASSNAME), > new BlockArg(PROPS_RESULT)}; > > private static final DirectiveDescriptor myDescr = > new DirectiveDescriptor("properties", null, myArgs, null); > > public static DirectiveDescriptor getDescriptor() > { > return myDescr; > } > > public PropertiesDirective() > { > } > > public Object build(DirectiveBuilder builder, BuildContext bc) > throws BuildException > { > try > { > target = (Variable) builder.getArg(PROPS_TARGET, bc); > } > catch (ClassCastException e) > { > throw new NotVariableBuildException(myDescr.name, e); > } > _className = (String) builder.getArg(PROPS_CLASSNAME, bc); > if (_className == null) > _className = DEFAULT_CLASS_NAME; > // > > // asMacro = (macroKeyword != null); > result = builder.getArg(PROPS_RESULT, bc); > return this; > } > > public void write(FastWriter out, Context context) > throws PropertyException, IOException > { > > try > { > if (!context.containsKey(target.getName())) > { > // target doesn't exist. Must create. > try > { > Class c = Class.forName(_className); > Object o = c.newInstance(); > target.setValue(context, o); > } > catch (RuntimeException re) > { > throw new PropertyException( > "Failed to create instance of " > + _className > + " for the #properties directive. " > + re, > re); > } > > } > // if (result instanceof Macro && !asMacro) > // target.setValue(context, ((Macro) result).evaluate(context)); > // else > // evaluate result macro > Object o = ((Macro) result).evaluate(context); > String res = (String) ((Macro) result).evaluate(context); > String[] lines = TextTool.getLines(res); > String s, prop, val; > String prefix = "#set $" + target.getVariableName() + "."; > for (int i = 0; i < lines.length; i++) > { > s = lines[i].trim(); > if (s.length() > 0 && !s.startsWith("#")) > { > for (int j = 0; j < s.length(); j++) > { > char ch = s.charAt(j); > if (ch == ':' || ch == '=') > { > prop = s.substring(0, j).trim(); > //TODO check if valid property name? > val = s.substring(j + 1).trim(); > // convert to WM syntax and evaluate > // TODO determine if quotes are needed, i.e., is it a number? > if (val.length() > 0) > { > // try first as a string > s = prefix + prop + "=\"" + val + "\""; > try > { > new StringTemplate( > context.getBroker(), > s).evaluateAsString( > context); > } > catch (WebMacroException wme) > { > // try again without quotes. > s = prefix + prop + "=" + val; > try > { > new StringTemplate(context.getBroker(),s) > .evaluateAsString(context); > } > catch (WebMacroException wme2) > { > // TODO utilize the EEH from the context? > throw new PropertyException("Failed to set property \"" > + prop + "\" to value \"" + val + "\" on variable \"" > + target.getVariableName() + "\" of type " > + target.getClass().getName(), > wme2); > } > } > break; > } > } > } > } > //target.setValue(context, result); > // parse the > } > } > catch (PropertyException e) > { > throw e; > } > catch (Exception e) > { > String errorText = "#properties: Unable to set " + target; > writeWarning(errorText, context, out); > } > } > > public void accept(TemplateVisitor v) > { > v.beginDirective(myDescr.name); > v.visitDirectiveArg("PropertiesClassKeyword", "class"); > v.visitDirectiveArg("PropertiesClassName", _className); > v.visitDirectiveArg("PropertiesTarget", target); > v.visitDirectiveArg("PropertiesValue", result); > v.endDirective(); > } > >} > > -- Lane Sharman Providing Private and SPAM-Free Email http://www.opendoors.com 858-755-2868 |
From: Keats K. <ke...@xa...> - 2005-07-30 20:33:54
|
I created a new directive called Properties directive. This can be handy if you want to set a bunch of properties on an object within a template; essentially providing a abbreviated, readable syntax. You can also combine it with the #include directive for processing a properties file. (Just be careful of comments: use "##" or "# " to keep them from confusing the parser.) I'm attaching the source and I will commit it to the core if folks agree it is worthy. Here's some test WMScript that illustrates the usage: ## Test using default object: java.util.Properties #set $Name="Keats Kirsch" #set $Age=45 <h3>\#properties test</h3> #properties $p { Name: $Name Age = $Age } My age is $p.Age<br> My name is $p.Name<br> ## Test using a pre-existing POJO (non-map) <h3>More \#properties</h3> #bean $Cal="java.util.Calendar" scope=static #set $GCal=$Cal.Instance Today: $GCal.Time, FirstDayOfWeek: $GCal.FirstDayOfWeek, Lenient: $GCal.Lenient <br> #properties $GCal { FirstDayOfWeek=0 Lenient=false } Today: $GCal.Time, FirstDayOfWeek: $GCal.FirstDayOfWeek, Lenient: $GCal.Lenient <br> |
From: Keats K. <ke...@xa...> - 2005-07-30 18:09:57
|
Marc Palmer wrote: > The WM Spring code I have is simply a conversion of the Velocity > Spring view for WM. There is an outstanding issue in that Velocity > supports a "spring.vm" macro that is on the classpath in spring.jar > and you can pull it in from any template as just "spring.vm" I > believe. We can't do this easily as far as I can see, as we need to > modify the WM config from within the Spring view code, which means > overriding any webmacro.properties etc. Actually it is possible to modify the configuration dynamically. I haven't tried this but the following should work: Properties props = new Properties(); props.setProperty("someProperty", "someValue"); broker.getSettings().load(props); Keats |
From: Marc P. <ma...@an...> - 2005-07-30 13:44:48
|
Lane Sharman wrote: > WM Faithful, > > I am undertaking Release 2 work. I would like the release to be 2.1. > > Also, eric, please get the webmacro.org site back up and announce this > to the group. As soon as this is done, I would like respective authors > of their pages to go in and refresh those pages. > > Also, I would strongly urge that a bridge between WM and Spring be > completed. This is really important because Spring is a useful container > for application execution and it supports different add-on tools. The > people who have expressed interest here should do the logical thing: get > an IM session running, describe the work, and, just do it. I have pending commits for this. If we are going to skip 2.0 and go straight for 2.1 with "early access" Spring and JSP I will commit this stuff tomorrow. The WM Spring code I have is simply a conversion of the Velocity Spring view for WM. There is an outstanding issue in that Velocity supports a "spring.vm" macro that is on the classpath in spring.jar and you can pull it in from any template as just "spring.vm" I believe. We can't do this easily as far as I can see, as we need to modify the WM config from within the Spring view code, which means overriding any webmacro.properties etc. ...which is why for WM 2.5 or 3 I am committed to overhauling the core configuration, Broker and resource handling stuff so that it is bean-like, not singletons, and therefore IoC/DI friendly. Keats and I haven't merged our ideas on the JSP taglib yet. I will get to this this week. Cheers -- Marc Palmer Managing Director, AnyWare Ltd. |
From: Lane S. <la...@op...> - 2005-07-30 04:05:15
|
Hi Nikhil, # # FastWriter Configuration # # Misconfiguration of these settings can cause severe performance # and resource penalties This is an exagerrattion and I have changed it. The refresh rate is in milliseconds. When a file changes on disk, there is not an event so it has to be polled. This is what has to occur. Every 1000 millis, check for changed templates and return the next generation of a cache. Lane Nikhil G. Daddikar wrote: > Thank you for your answer. I have two questions: > > 1) what are those FastWriter settings in WM.properties, there is a > note there that it will "significantly" affect performance but it > doesn't tell me how. > > 2) Is the refresh rate specified in seconds? Also, I don't understand > it's purpose. Why would I want it to reload after some specific time? > I would only want it to load after it changes. Right? > Thanks again. > > Lane Sharman wrote: > >> Hello Nikhil, >> >> About 2 years ago, we had a very intense >> development/dialog/experimentation with caching. All of this >> resulted in a pluggable architecture. Brian Goetz provided this >> architecture on the whole. I wrote a caching system, which is best >> called a "generational system". I use it in all of my wm apps. >> >> #entry in webmacro.properties: >> >> CachingProvider.template.CacheManager: >> org.webmacro.resource.GenerationalCacheManager >> CachingProvider.url.CacheManager: >> org.webmacro.resource.GenerationalCacheManager >> # Set reloading to true since we are in development mode by default. >> GenerationalCacheManager.*.ReloadOnChange: true >> # The refresh rate for incorporating changes to the mutable image >> GenerationalCacheManager.*.RefreshRate: 1000 >> >> >> The RefreshRate is the most important for performance purposes. It >> means: "if the cache has not been updated for this amt of time, and >> there are stale changes, and there is an idle interval, then replace >> the current generation with a newer generation.". >> >> Since updates occur only to the prospective cache, the current cache >> is read-only and therefore not subject to syncrhonization. >> >> Give it a try! >> >> Lane >> >> >> Nikhil G. Daddikar wrote: >> >>> Hello, >>> >>> I have about 1000 templates and am looking for help in setting up >>> the cache settings in WebMacro.properties. Can some one please guide >>> me. >>> >>> Thanks. >>> Nikhil >> >> >> >> -- >> Lane Sharman >> Providing Private and SPAM-Free Email >> http://www.opendoors.com >> 858-755-2868 >> > > > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click > _______________________________________________ > Webmacro-user mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/webmacro-user > -- Lane Sharman Providing Private and SPAM-Free Email http://www.opendoors.com 858-755-2868 |
From: Nikhil G. D. <ng...@ce...> - 2005-07-30 03:48:53
|
Thank you for your answer. I have two questions: 1) what are those FastWriter settings in WM.properties, there is a note there that it will "significantly" affect performance but it doesn't tell me how. 2) Is the refresh rate specified in seconds? Also, I don't understand it's purpose. Why would I want it to reload after some specific time? I would only want it to load after it changes. Right? Thanks again. Lane Sharman wrote: > Hello Nikhil, > > About 2 years ago, we had a very intense > development/dialog/experimentation with caching. All of this resulted > in a pluggable architecture. Brian Goetz provided this architecture on > the whole. I wrote a caching system, which is best called a > "generational system". I use it in all of my wm apps. > >#entry in webmacro.properties: > >CachingProvider.template.CacheManager: org.webmacro.resource.GenerationalCacheManager >CachingProvider.url.CacheManager: org.webmacro.resource.GenerationalCacheManager ># Set reloading to true since we are in development mode by default. >GenerationalCacheManager.*.ReloadOnChange: true ># The refresh rate for incorporating changes to the mutable image >GenerationalCacheManager.*.RefreshRate: 1000 > > > The RefreshRate is the most important for performance purposes. It > means: "if the cache has not been updated for this amt of time, and > there are stale changes, and there is an idle interval, then replace > the current generation with a newer generation.". > > Since updates occur only to the prospective cache, the current cache > is read-only and therefore not subject to syncrhonization. > > Give it a try! > > Lane > > > Nikhil G. Daddikar wrote: > >> Hello, >> >> I have about 1000 templates and am looking for help in setting up the >> cache settings in WebMacro.properties. Can some one please guide me. >> >> Thanks. >> Nikhil > > >-- >Lane Sharman >Providing Private and SPAM-Free Email >http://www.opendoors.com >858-755-2868 > |
From: Lane S. <la...@op...> - 2005-07-30 01:44:40
|
WM Faithful, I am undertaking Release 2 work. I would like the release to be 2.1. Also, eric, please get the webmacro.org site back up and announce this to the group. As soon as this is done, I would like respective authors of their pages to go in and refresh those pages. Also, I would strongly urge that a bridge between WM and Spring be completed. This is really important because Spring is a useful container for application execution and it supports different add-on tools. The people who have expressed interest here should do the logical thing: get an IM session running, describe the work, and, just do it. An Eclipse plug-in is a must. Someone, (hint, hint) needs to do this and submit it to me for inclusion in the release. I would like to write an article for Java World on WebMacro. Any others who want to help out are more then welcome. regards, -- Lane Sharman Providing Private and SPAM-Free Email http://www.opendoors.com 858-755-2868 |
From: Lane S. <la...@op...> - 2005-07-30 01:34:13
|
great! I would go for it. It would be great news for the upcoming release. Just do it!!! -Lane Dominik wrote: >Hy, >yes I would, but the source is not available, so it might be difficult. >Perhaps ill contact the author, because it's a sourceforge-project ans so >has to be opensource. >== >Greetings >Dominik >mailto:do...@db... > >-----Ursprüngliche Nachricht----- >Von: web...@li... >[mailto:web...@li...] Im Auftrag von Lane >Sharman >Gesendet: Donnerstag, 28. Juli 2005 18:04 >An: web...@li... >Betreff: Re: [WebMacro-user] Eclipse Plugin > >Hi Dominik: > >Would you consider modifying the velocity plug-in for WM? > >-lane > >Dominik wrote: > > > >>Hy, >>is there a Eclipse Plugin for editing wm files? Im using a pulgin wich >>parses velocity code, I get a code highlighting at least but as the code of >>wm and velocity isn't compatible it produces some errors. >>== >>Greetings >>Dominik >>mailto:do...@db... >> >> >> >>------------------------------------------------------- >>SF.Net email is sponsored by: Discover Easy Linux Migration Strategies >> >> >>from IBM. Find simple to follow Roadmaps, straightforward articles, > > >>informative Webcasts and more! Get everything you need to get up to >>speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click >>_______________________________________________ >>Webmacro-user mailing list >>Web...@li... >>https://lists.sourceforge.net/lists/listinfo/webmacro-user >> >> >> >> >> > > > -- Lane Sharman Providing Private and SPAM-Free Email http://www.opendoors.com 858-755-2868 |
From: Lane S. <la...@op...> - 2005-07-30 01:32:55
|
Hello Nikhil, About 2 years ago, we had a very intense development/dialog/experimentation with caching. All of this resulted in a pluggable architecture. Brian Goetz provided this architecture on the whole. I wrote a caching system, which is best called a "generational system". I use it in all of my wm apps. #entry in webmacro.properties: CachingProvider.template.CacheManager: org.webmacro.resource.GenerationalCacheManager CachingProvider.url.CacheManager: org.webmacro.resource.GenerationalCacheManager # Set reloading to true since we are in development mode by default. GenerationalCacheManager.*.ReloadOnChange: true # The refresh rate for incorporating changes to the mutable image GenerationalCacheManager.*.RefreshRate: 1000 The RefreshRate is the most important for performance purposes. It means: "if the cache has not been updated for this amt of time, and there are stale changes, and there is an idle interval, then replace the current generation with a newer generation.". Since updates occur only to the prospective cache, the current cache is read-only and therefore not subject to syncrhonization. Give it a try! Lane Nikhil G. Daddikar wrote: > Hello, > > I have about 1000 templates and am looking for help in setting up the > cache settings in WebMacro.properties. Can some one please guide me. > > Thanks. > Nikhil -- Lane Sharman Providing Private and SPAM-Free Email http://www.opendoors.com 858-755-2868 |
From: Keats K. <ke...@xa...> - 2005-07-29 22:12:45
|
Yes the #eval/#templet mechanism is the way to go. You get a new context for each iteration with a reference to the original context. There's an example in the unit tests you can look at. Keats Marc Palmer wrote: >Hi guys, > >I can't reach webmacro.org here - it's resolving but timing out. Eric? > >Anyway, can somebody give me a bit of clarity on WM recursion - I've >forgotten the details. > >Basically I am recursively including a template to render a tree. However >the included template is of course trashing the variables in the "outer" >context. > >Is the solution to this to use #eval or #templet? Something that is part >of WM core is preferred - whereby I can pass in certain values but the >included template fragment gets its own Context. > >I'm using my WM JSP taglib code and it's working well "in anger" here >(literally - the JSP pissed me off so much and caused so much ugliness to >do this recursive rendering, so now we have a JSP/WM hybrid). > >I can "push" the sensitive variables to temp vars before the include and >"pop" them off after but that is ugly indeed. > >Cheers > > > > |
From: Nikhil G. D. <ng...@ce...> - 2005-07-29 13:13:39
|
Hello, I have about 1000 templates and am looking for help in setting up the cache settings in WebMacro.properties. Can some one please guide me. Thanks. Nikhil |