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: Eric B. R. <eb...@tc...> - 2002-11-29 06:53:05
|
On Thursday, November 28, 2002, at 09:15 AM, Endre St=F8lsvik wrote: > On Mon, 25 Nov 2002, Eric B.Ridge wrote: > > | On Friday, November 22, 2002, at 07:22 AM, Endre St=F8lsvik wrote: > | > Shouldn't the cranky-dude kick on _everything_?? > | > | I've spent some time looking at this, and I'm changing it, but the > | "fix" has an interesting side effect when using the > | DefaultEvaluationExceptionHandler. > > It seems to have another side effect, one which makes it impossible to = =20 > use > 1.1b2 for me.. > > org.webmacro.PropertyException: Evaluation warning: WARNING: > /data/devel/endre/new/server/webapp/WEB-INF/classes/com/corelets/=20 > configure/templates/WorkbenchCoreletDropDownPrintout.wm:13.34 > includes itself. at =20 > /data/devel/endre/new/server/webapp/WEB-INF/classes/com/corelets/=20 > configure/templates/WorkbenchCoreletDropDownPrintout.wm:13.34 This has nothing to do with CrankyEEH. It is actually a change I made =20= to IncludeDirective. I really think #include should log something when a template tries to =20= include itself, but maybe it doesn't need to be a WARN. Maybe INFO or =20= NOTICE? What log-level do you use? <snip> > THIS IS INTENTIONAL!! It is a tree. > > How can it be an error, even a warning, that a thing recurses? So what it should be? > I don't want any log-lines, and definately not any Exceptions thrown =20= > at me > for doing a simple recursion. It doesn't throw, only logs. eric |
From: Marc v. de G. <mvd...@xs...> - 2002-11-28 21:44:14
|
Hi, Is it possible to add a new method to the org.webmacro.servlet.Form class? I would very much like it when there is a method that adds all received form data back to context. I can even write it, because I have the Webmacro 1.1b2 source jar installed here and it is compiling. If such a method will not be included in the official release, I will add it to the tool I've created myself. But I think it would be a nice extension of the existing Form tool. I already noticed that the context is not available yet in the Form class. It could be passed to the constructor, just like the request. FYI: I would use it to reuse the received form data to redisplay the received form. The redisplay is necessary when one of the fields is badly formatted. Kind regards, Marc |
From: <web...@st...> - 2002-11-28 14:15:06
|
On Mon, 25 Nov 2002, Eric B.Ridge wrote: | On Friday, November 22, 2002, at 07:22 AM, Endre Stølsvik wrote: | > Shouldn't the cranky-dude kick on _everything_?? | | I've spent some time looking at this, and I'm changing it, but the | "fix" has an interesting side effect when using the | DefaultEvaluationExceptionHandler. It seems to have another side effect, one which makes it impossible to use 1.1b2 for me.. org.webmacro.PropertyException: Evaluation warning: WARNING: /data/devel/endre/new/server/webapp/WEB-INF/classes/com/corelets/configure/templates/WorkbenchCoreletDropDownPrintout.wm:13.34 includes itself. at /data/devel/endre/new/server/webapp/WEB-INF/classes/com/corelets/configure/templates/WorkbenchCoreletDropDownPrintout.wm:13.34 at /data/devel/endre/new/server/webapp/WEB-INF/classes/com/corelets/configure/templates/WorkbenchCoreletDropDownPrintout.wm:13.34 at org.webmacro.engine.CrankyEvaluationExceptionHandler.warningString(CrankyEvaluationExceptionHandler.java:113) at org.webmacro.directive.Directive.getWarningText(Directive.java:106) at org.webmacro.directive.Directive.writeWarning(Directive.java:119) at org.webmacro.directive.IncludeDirective.write(IncludeDirective.java:337) at org.webmacro.engine.Block.write(Block.java:135) at org.webmacro.directive.IfDirective.write(IfDirective.java:192) at org.webmacro.engine.Block.write(Block.java:135) ... THIS IS INTENTIONAL!! It is a tree. How can it be an error, even a warning, that a thing recurses? I don't want any log-lines, and definately not any Exceptions thrown at me for doing a simple recursion. -- Mvh, Endre Stølsvik M[+47 93054050] F[+47 51625182] Developer @ CoreTrek AS - http://www.coretrek.com/ CoreTrek corporate portal / EIP - http://www.corelets.com/ |
From: <web...@st...> - 2002-11-28 12:35:16
|
On Fri, 22 Nov 2002, Eric B.Ridge wrote: | On Friday, November 22, 2002, at 07:22 AM, Endre Stølsvik wrote: | > Shouldn't the cranky-dude kick on _everything_?? | | He should definitely complain about your two errors below. I'll look | into it, and try to get it into the next beta release (which might | happen tonight). | | eric Eric: EXCELLENT, happy-dude! ;-) -- Mvh, Endre Stølsvik M[+47 93054050] F[+47 51625182] Developer @ CoreTrek AS - http://www.coretrek.com/ CoreTrek corporate portal / EIP - http://www.corelets.com/ |
From: Tim P. <ti...@pa...> - 2002-11-27 11:46:44
|
On Wednesday 27 November 2002 1:45 am, Tom May wrote: > Tim Pizey <ti...@pa...> writes: > > <plug> > > Melati, which uses WebMacro, has two mechanisms > > for validation: client -side javascript and server-side > > validation (as defined by the Data Structure Definition). > > > > You, the programmer, get this for free when you buy into the > > POEM middleware layer. > > </plug> > > > > The client side javascript may be of interest, as it is > > independant of POEM/Melati > > http://www.melati.org/melati-static/admin/validation.js > > Just realize that doing client side validation does not absolve you > from having to do server side validation as well. Clients can and do > send all kinds of wacky things. > Ain't that the truth. Tim |
From: Nick S. <NSa...@ms...> - 2002-11-27 09:29:06
|
Hi I've been using webMacro in projects for a couple of years now. We use an opensource validation project called formproc. www.formproc.org It's not terribly well documented but at least all the source code is there. It works well with webmacro because it's server side and not tied to any particular technology (except Java). It allows reuse of validators and can certainly cut down on validation code. It also features autopopulation of value objects and type conversion. It all depends upon how happy you are about maintaining a separate XML configuration file for validations. As for client side validation using javascript, I used it for quite a long time but I've struggled so many times with quirky browser versions that I try and avoid it altogether if I can. Regards Nick Sanderson >>> Tom May <to...@in...> 11/27/02 01:45am >>> Tim Pizey <ti...@pa...> writes: > <plug> > Melati, which uses WebMacro, has two mechanisms > for validation: client -side javascript and server-side > validation (as defined by the Data Structure Definition). > > You, the programmer, get this for free when you buy into the > POEM middleware layer. > </plug> > > The client side javascript may be of interest, as it is > independant of POEM/Melati > http://www.melati.org/melati-static/admin/validation.js Just realize that doing client side validation does not absolve you from having to do server side validation as well. Clients can and do send all kinds of wacky things. Tom. ------------------------------------------------------- This SF.net email is sponsored by: Get the new Palm Tungsten T handheld. Power & Color in a compact size! http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en _______________________________________________ Webmacro-user mailing list Web...@li... https://lists.sourceforge.net/lists/listinfo/webmacro-user |
From: Eric B. R. <eb...@tc...> - 2002-11-27 04:58:21
|
Hurry on over to http://www.webmacro.org/DownloadWebMacro to grab 1.1b2. This release fixes various bugs that have been reported since 1.1 (and some that have been around for a long time). It also includes the beginnings of a macros/ directory where you will find #macro's that might be useful. If you have #macro's that you'd like to contribute, feel free to send them to the -user list, or to Lane Sharman (la...@sa...). In addition, this is the first release to be packaged in separate binary and source downloads. If you pick the -src release, you'll be able to compile, jar, and test WebMacro in the same manner that the CVS junkies do. Isn't that cool? Note that the -bin release no longer includes webmacro-src.jar. As this is the first dual release, I would appreciate any comments on better directory structure organization. As always, feel free to send your bug reports, gripes, questions, and death threats to web...@li..., or feed 'em to Bugzilla: http://www.webmacro.org/bugzilla. Thanks and enjoy! eric |
From: Tom M. <to...@in...> - 2002-11-27 01:45:30
|
Tim Pizey <ti...@pa...> writes: > <plug> > Melati, which uses WebMacro, has two mechanisms > for validation: client -side javascript and server-side > validation (as defined by the Data Structure Definition). > > You, the programmer, get this for free when you buy into the > POEM middleware layer. > </plug> > > The client side javascript may be of interest, as it is > independant of POEM/Melati > http://www.melati.org/melati-static/admin/validation.js Just realize that doing client side validation does not absolve you from having to do server side validation as well. Clients can and do send all kinds of wacky things. Tom. |
From: Tim P. <ti...@pa...> - 2002-11-26 22:50:42
|
Marc,=20 You might be suprised at the time Melati saves you :) cheers Tim Pizey On Tuesday 26 November 2002 8:10 pm, Marc van de Geijn wrote: > RE: [WebMacro-user] How to subclass WebContext?Thanks for pointing me t= o > this product. Sounds great. I wish I had the time to look into it, but = I'm > affraid I will have to do with the config I currently have. I almost ha= ve > everything setup to really start develope the servlets and templates. > > Marc > ----- Original Message ----- > From: keats_kirschATnatureserve.org > > I think the Metali application (http://www.melati.org/) does form > validation using JavaScript. I'm not a big JavaScript fan, but using > templates to generate client-side validation seems like a pretty > interesting approach. > > Keats |
From: Tim P. <ti...@pa...> - 2002-11-26 22:47:48
|
On Tuesday 26 November 2002 7:05 pm, Eric B. Ridge wrote: > On Tuesday, November 26, 2002, at 10:37 AM, Marc van de Geijn wrote: > <snip> > > > The "new" question I have is a short one: I've already searched for i= t > > on > > the WebMacro site and in the API. I can not find a method/class to > > check if > > the data I receive from a form is correctly formatted. Is there a > > recommended way to solve this? I'm sure I'm not the only one having > > this > > problem. WebMacro is still suprising me (in a very positive way): May= be > > there is another part of WebMacro I still have not discovered. > > Looking for some kind of form validation, eh? Not part of WebMacro, > but maybe it could be. If you create something you'd like to share, > just let us know. Some of us here could probably help you flush it out > and perhaps get it included as a /contrib package, or as an (optional) > core thing. You're right, it comes up a lot. This wouldn't really be a Template sort of thing to do,=20 it is a framework sort of thing.=20 Form validation depends upon the objects you are putting into=20 and taking out of the form, which implies a commitment to a=20 particular persistence layer. <plug> Melati, which uses WebMacro, has two mechanisms=20 for validation: client -side javascript and server-side=20 validation (as defined by the Data Structure Definition). You, the programmer, get this for free when you buy into the=20 POEM middleware layer. </plug> The client side javascript may be of interest, as it is=20 independant of POEM/Melati http://www.melati.org/melati-static/admin/validation.js=20 cheers tim pizey |
From: Marc v. de G. <mvd...@xs...> - 2002-11-26 20:11:09
|
RE: [WebMacro-user] How to subclass WebContext?Thanks for pointing me to = this product. Sounds great. I wish I had the time to look into it, but = I'm affraid I will have to do with the config I currently have. I almost = have everything setup to really start develope the servlets and = templates. Marc ----- Original Message -----=20 From: kea...@na...=20 To: mvd...@xs...=20 Cc: web...@li...=20 Sent: Tuesday, 26 November 2002 20:54 Subject: RE: [WebMacro-user] How to subclass WebContext? I think the Metali application (http://www.melati.org/) does form = validation using JavaScript. I'm not a big JavaScript fan, but using = templates to generate client-side validation seems like a pretty = interesting approach. Keats=20 > -----Original Message-----=20 > From: web...@li...=20 > [mailto:web...@li...]On Behalf=20 > Of Marc van=20 > de Geijn=20 > Sent: Tuesday, November 26, 2002 2:26 PM=20 > To: Eric B. Ridge=20 > Cc: web...@li...=20 > Subject: Re: [WebMacro-user] How to subclass WebContext?=20 >=20 >=20 > Hi Eric,=20 >=20 > Thanks for your answer.=20 >=20 > I would like to help with such a class, but the one I'm gonna=20 > create will be=20 > (again) in combination with Jetgen specific things. The=20 > Jetgen contextTool=20 > will be the glue between the Jetgen classes and the WebMacro = classes.=20 >=20 > Thanks again for your answer!=20 >=20 > Marc=20 >=20 > ----- Original Message -----=20 > From: "Eric B. Ridge" <eb...@tc...>=20 > To: "Marc van de Geijn" <mvd...@xs...>=20 > Cc: "webmacro-user" <>=20 > Sent: Tuesday, 26 November 2002 20:05=20 > Subject: Re: [WebMacro-user] How to subclass WebContext?=20 >=20 >=20 > > On Tuesday, November 26, 2002, at 10:37 AM, Marc van de=20 > Geijn wrote:=20 > > <snip>=20 > > > The "new" question I have is a short one: I've already=20 > searched for it=20 > > > on=20 > > > the WebMacro site and in the API. I can not find a method/class = to=20 > > > check if=20 > > > the data I receive from a form is correctly formatted. Is there = a=20 > > > recommended way to solve this? I'm sure I'm not the only=20 > one having=20 > > > this=20 > > > problem. WebMacro is still suprising me (in a very=20 > positive way): Maybe=20 > > > there is another part of WebMacro I still have not discovered.=20 > >=20 > > Looking for some kind of form validation, eh? Not part of = WebMacro,=20 > > but maybe it could be. If you create something you'd like to = share,=20 > > just let us know. Some of us here could probably help you=20 > flush it out=20 > > and perhaps get it included as a /contrib package, or as an=20 > (optional)=20 > > core thing. You're right, it comes up a lot.=20 > >=20 > > eric=20 > >=20 > >=20 > >=20 > > -------------------------------------------------------=20 > > This SF.net email is sponsored by: Get the new Palm Tungsten T=20 > > handheld. Power & Color in a compact size!=20 > > http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en=20 > > _______________________________________________=20 > > Webmacro-user mailing list=20 > > Web...@li...=20 > > https://lists.sourceforge.net/lists/listinfo/webmacro-user=20 > >=20 >=20 >=20 >=20 > -------------------------------------------------------=20 > This SF.net email is sponsored by: Get the new Palm Tungsten T=20 > handheld. Power & Color in a compact size!=20 > http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en=20 > _______________________________________________=20 > Webmacro-user mailing list=20 > Web...@li...=20 > https://lists.sourceforge.net/lists/listinfo/webmacro-user=20 >=20 |
From: <kea...@na...> - 2002-11-26 19:53:29
|
I think the Metali application (http://www.melati.org/) does form validation using JavaScript. I'm not a big JavaScript fan, but using templates to generate client-side validation seems like a pretty interesting approach. Keats > -----Original Message----- > From: web...@li... > [mailto:web...@li...]On Behalf > Of Marc van > de Geijn > Sent: Tuesday, November 26, 2002 2:26 PM > To: Eric B. Ridge > Cc: web...@li... > Subject: Re: [WebMacro-user] How to subclass WebContext? > > > Hi Eric, > > Thanks for your answer. > > I would like to help with such a class, but the one I'm gonna > create will be > (again) in combination with Jetgen specific things. The > Jetgen contextTool > will be the glue between the Jetgen classes and the WebMacro classes. > > Thanks again for your answer! > > Marc > > ----- Original Message ----- > From: "Eric B. Ridge" <eb...@tc...> > To: "Marc van de Geijn" <mvd...@xs...> > Cc: "webmacro-user" <> > Sent: Tuesday, 26 November 2002 20:05 > Subject: Re: [WebMacro-user] How to subclass WebContext? > > > > On Tuesday, November 26, 2002, at 10:37 AM, Marc van de > Geijn wrote: > > <snip> > > > The "new" question I have is a short one: I've already > searched for it > > > on > > > the WebMacro site and in the API. I can not find a method/class to > > > check if > > > the data I receive from a form is correctly formatted. Is there a > > > recommended way to solve this? I'm sure I'm not the only > one having > > > this > > > problem. WebMacro is still suprising me (in a very > positive way): Maybe > > > there is another part of WebMacro I still have not discovered. > > > > Looking for some kind of form validation, eh? Not part of WebMacro, > > but maybe it could be. If you create something you'd like to share, > > just let us know. Some of us here could probably help you > flush it out > > and perhaps get it included as a /contrib package, or as an > (optional) > > core thing. You're right, it comes up a lot. > > > > eric > > > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: Get the new Palm Tungsten T > > handheld. Power & Color in a compact size! > > http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en > > _______________________________________________ > > Webmacro-user mailing list > > Web...@li... > > https://lists.sourceforge.net/lists/listinfo/webmacro-user > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Get the new Palm Tungsten T > handheld. Power & Color in a compact size! > http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en > _______________________________________________ > Webmacro-user mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/webmacro-user > |
From: Marc v. de G. <mvd...@xs...> - 2002-11-26 19:25:43
|
Hi Eric, Thanks for your answer. I would like to help with such a class, but the one I'm gonna create will be (again) in combination with Jetgen specific things. The Jetgen contextTool will be the glue between the Jetgen classes and the WebMacro classes. Thanks again for your answer! Marc ----- Original Message ----- From: "Eric B. Ridge" <eb...@tc...> To: "Marc van de Geijn" <mvd...@xs...> Cc: "webmacro-user" <> Sent: Tuesday, 26 November 2002 20:05 Subject: Re: [WebMacro-user] How to subclass WebContext? > On Tuesday, November 26, 2002, at 10:37 AM, Marc van de Geijn wrote: > <snip> > > The "new" question I have is a short one: I've already searched for it > > on > > the WebMacro site and in the API. I can not find a method/class to > > check if > > the data I receive from a form is correctly formatted. Is there a > > recommended way to solve this? I'm sure I'm not the only one having > > this > > problem. WebMacro is still suprising me (in a very positive way): Maybe > > there is another part of WebMacro I still have not discovered. > > Looking for some kind of form validation, eh? Not part of WebMacro, > but maybe it could be. If you create something you'd like to share, > just let us know. Some of us here could probably help you flush it out > and perhaps get it included as a /contrib package, or as an (optional) > core thing. You're right, it comes up a lot. > > eric > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Get the new Palm Tungsten T > handheld. Power & Color in a compact size! > http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en > _______________________________________________ > Webmacro-user mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/webmacro-user > |
From: Eric B. R. <eb...@tc...> - 2002-11-26 19:06:36
|
On Tuesday, November 26, 2002, at 10:37 AM, Marc van de Geijn wrote: <snip> > The "new" question I have is a short one: I've already searched for it > on > the WebMacro site and in the API. I can not find a method/class to > check if > the data I receive from a form is correctly formatted. Is there a > recommended way to solve this? I'm sure I'm not the only one having > this > problem. WebMacro is still suprising me (in a very positive way): Maybe > there is another part of WebMacro I still have not discovered. Looking for some kind of form validation, eh? Not part of WebMacro, but maybe it could be. If you create something you'd like to share, just let us know. Some of us here could probably help you flush it out and perhaps get it included as a /contrib package, or as an (optional) core thing. You're right, it comes up a lot. eric |
From: Marc v. de G. <mvd...@xs...> - 2002-11-26 15:37:41
|
Hi, Here a little note on the progress and another question. The progress is that I've created a ContextTool and got it up and running. It's working just great and I already see some possiblilities to extend the class and make it all even more flexible (all in combination with the jetgen classes that are being generated). The "new" question I have is a short one: I've already searched for it on the WebMacro site and in the API. I can not find a method/class to check if the data I receive from a form is correctly formatted. Is there a recommended way to solve this? I'm sure I'm not the only one having this problem. WebMacro is still suprising me (in a very positive way): Maybe there is another part of WebMacro I still have not discovered. Regards, Marc |
From: Lane S. <la...@sa...> - 2002-11-26 01:34:03
|
Hi Marc, What I have found is that I like to work in wm with a limited set of classes for rendering, data acquisition. Further, generally, I keep a model or data class out of the context and use a facade of the model in the context. In this manner, I can build up a transaction within current session contexts and not modify the integrity of the memory image of the model which is reuseable in every transaction and viewable as an immutable, consistent image slice of the entire data model. Upon completion of a transaction within a facade data layer, it can be a) committed to the backing store and to the memory model following the ACID principle b) it can be committed to the backing store and the memory image can be marked as invalid and subject to a refresh at some interval of time in the future depending on the need for currency in the application. With SparseProperties, I have a facade property object which is extremely easy to manipulate in a wm context as a descendant of j.u.Hashtable and an implementor of Map. -lane Marc van de Geijn wrote: >Hi Lane, > > > >>I believe you are discussing the classical binding problem: data is >>retrieved in "jetools" format and you want it to be "wm formattable"? Is >>this correct? >> >> > >That wasn't my initial question, but after the exchange of a few posts with >Eric.. > > > >>If so, take a look at the new class file, o.w.util.SparseProperties. >>This is a subclass of Properties which is general enough to allow one to >>write property exchange adapters. You will see this class in the next >>release posted by Eric. >> >> > >I looked at the version in CVS, but I can't figure out where exactly in >WebMacro this class fits in. > >At this moment I'm looking into the option to write a JetgenTool class. I >hope (I'm not 100% sure yet) I can write a general class that can put all >Jetgen fields into the context and when it returns from a form post get all >the fields back into that Jetgen class. During the getting and putting I can >do the transformation for some classes to/from some other format. > >Kind regards, >Marc > > > > |
From: Lane S. <la...@sa...> - 2002-11-26 00:06:15
|
Hi Marc, I believe you are discussing the classical binding problem: data is retrieved in "jetools" format and you want it to be "wm formattable"? Is this correct? If so, take a look at the new class file, o.w.util.SparseProperties. This is a subclass of Properties which is general enough to allow one to write property exchange adapters. You will see this class in the next release posted by Eric. SparseProperties also has a feature which some of you will like but that is completely specifiable: you can customize how you want a null value returned: null, "", 0.00, or new AnonValue(). This is highly useful when iterating over a property set and some of the keys are not-null but the values are null and you just want "" in your template output. kindest regards, Lane Marc van de Geijn wrote: >Hi, > >I hope this is the place to ask the following question. If not, just ignore >it. > >First of all: I'm new to WebMacro (using it for a week now) and the more I >get to know it, the more I like it. Great job! > >What I'm trying to do is: At one side there are the WebMacro classes for >processing the Web requests and responses, on the other the Jetgen classes >(http://www.jetools.com) for access to the database. > >I've got both up and running. Somehow I want to make the conversion of the >data from the jetgen classes into the WebMacro classes easy. I was thinking >about subclassing the WebContext class to add methods to do just that. I >already have a subclass of WMServlet to do some basic stuff with form data. > >The problem is: there are so many final classes, that I'm wondering if it is >possible to do this. Especially the newInstance method. Can somebody give me >tips on how to do this so I can use that WebContext subclass in the >WMServlet subclass I've already created? Or is there some other approach >somebody can recommend for this problem? > >Kind regards, >Marc > > > >------------------------------------------------------- >This sf.net email is sponsored by:ThinkGeek >Welcome to geek heaven. >http://thinkgeek.com/sf >_______________________________________________ >Webmacro-user mailing list >Web...@li... >https://lists.sourceforge.net/lists/listinfo/webmacro-user > > > |
From: Marc v. de G. <mvd...@xs...> - 2002-11-25 22:50:12
|
> > I thought of that, but before I pass the field values over to the > > template, > > I do want to do some formating of several values (e.g. dates values > > from the > > yyyy-mm-dd format to the dd-mm-yyyy format). I do not want to do that > > in the > > template. So, although I tried it, this is not an option for me. > > well, then this $Jetgen object should be a wrapper around the real > Jetgen class. A wrapper that you write, that does the various date > transformations and such. I think it would be better to create a new JetgenTool class that automaticly puts/gets all values of a record to/from the Form tool. I think the advantage of using the Form class for also putting the values to the template is that I can easily reload the form without losing the values already entered (e.g. detecting a bad formatted field in the form at server site and give the user a chance to correct it). > > I think I will go for this option. It is flexibele and I can add it or > > not > > in future projects without much trouble. Thanks for the advice. Next > > problem > > is how am I going to create a Tool class: www.webmacro.org, here I > > come for > > another visit... > > Tools are easy. The best place to look, imho, is in cvsweb. > org/webmacro/servlet/FormTool.java for a simple example. I've already looked at the csvweb a couple of days ago. Very briefly. What I was looking for is the complete java code of the version I'm currenty using (1.1b1). It seems to be unavailable. Is it? I must honestly say that I'm still trying to get comfortable with the hole WebMacro concept. At the moment I'm doing a little project beside my daytime job. For that project I'm using WebMacro. Although it is costing me more time now, I'm 100% sure it will save me a lot of time in the near future. I really wish we would have choosen WebMacro at work. I suggested it at the start of the current project I'm working on, but at that moment I was unable to convince my collegues why we should use it. Hopefully I will be able to do that in the next project. Marc P.S. Btw, it was Marcel Huijkman who pointed me to WebMacro... He probably doesn't know it himself and if he is reading this, he will be wondering who I am. A little hint: UniXS. ;-) |
From: Eric B. R. <eb...@tc...> - 2002-11-25 22:05:13
|
> I thought of that, but before I pass the field values over to the > template, > I do want to do some formating of several values (e.g. dates values > from the > yyyy-mm-dd format to the dd-mm-yyyy format). I do not want to do that > in the > template. So, although I tried it, this is not an option for me. well, then this $Jetgen object should be a wrapper around the real Jetgen class. A wrapper that you write, that does the various date transformations and such. > I think I will go for this option. It is flexibele and I can add it or > not > in future projects without much trouble. Thanks for the advice. Next > problem > is how am I going to create a Tool class: www.webmacro.org, here I > come for > another visit... Tools are easy. The best place to look, imho, is in cvsweb. org/webmacro/servlet/FormTool.java for a simple example. eric |
From: Marc v. de G. <mvd...@xs...> - 2002-11-25 21:39:02
|
<< Removed irrelevant text >> > You don't really want to subclass WebContext. Instead, you want to > make helper classes or tools (by implementing org.webmacro.ContextTool > and configuring it via webmacro.properties). If you have some kind of > Jetgen tool, you can use it via your templates like this: > $Jetgen.Records > $Jetgen.LastQuery > $Jetgen.Whatever ## i've never used Jeetgen, so I don't really > know what it does. :) > > And from your sevlet code, you can access your Jetgen tool like this: > JetgenTool jetgen = (JetgenTool) context.get("Jetgen"); > jetgen.getRecords(); > jetgen.getLastQuery(); > jetgen.getWhatever(); > And if you don't like the ContextTool approach, you can just .put the > object into the context: > context.put ("Jetgen", new JetgenTool()); I thought of that, but before I pass the field values over to the template, I do want to do some formating of several values (e.g. dates values from the yyyy-mm-dd format to the dd-mm-yyyy format). I do not want to do that in the template. So, although I tried it, this is not an option for me. > > The problem is: there are so many final classes, that I'm wondering if > > it is > > possible to do this. Especially the newInstance method. Can somebody > > give me > > tips on how to do this so I can use that WebContext subclass in the > > WMServlet subclass I've already created? Or is there some other > > approach > > somebody can recommend for this problem? > > Btw, there is already an http request form tool > (org.webmacro.servlet.FormTool) that is configured by default. Access > it from your templates as $Form, and from your code as: > servletContext.getForm() > > Lots of things in WM are final on purpose. The idea of WM is not to > allow you to directly extend and subclass it, but to allow you to > extend its functionality by creating tools that aren't (really) > specific to WebMacro... and to use your existing classes and objects > w/o change. This way, WebMacro stays focused on what it does best: > template rendering, and you can focus on your application w/o worrying > about implementation details of WM. I think I will go for this option. It is flexibele and I can add it or not in future projects without much trouble. Thanks for the advice. Next problem is how am I going to create a Tool class: www.webmacro.org, here I come for another visit... Regards, Marc |
From: paul <pa...@pa...> - 2002-11-25 17:57:33
|
Actually this will cause problems when he wants to instantiate WebMacro outside the browser context [i.e. - sending templated email]. Put it in the WEB-INF/classes folder this way if your templates reside in a WEB-INF/lib jar or are in a folder under the WEB-INF/classes directory you can easily create a new context and locate the templates with: WebMacro wm =3D new WM("./WebMacro.properties"); This also allows you to use different WebMacro.properties for different applications so that if you are or planning to use virtual hosting with tomcat [i.e. - different domains running under the same instance of tomcat] you can drop different WebMacro.properties in the classes directory so that you templates don=92t get cross referenced if you use the same naming convention for multiple applications [i.e - index.wm] Otherwise you may have to use the full path or try to figure it out relative to where the servlet container executes... which I have spent hours on... I think that is where I got my grey hair from...=20 Hope this helps... cheers paul =A4 http://www.pagepaul.com =A4 -----Original Message----- From: web...@li... [mailto:web...@li...] On Behalf Of Matthew Inger Sent: Monday, November 25, 2002 8:49 AM To: kea...@na...; ste...@ea... Cc: web...@li... Subject: RE: [WebMacro-user] WebMacro.properties question You need to put it in the WEB-INF subdirectory of your web root folder.=A0 That is automatically part of your search path via the classloader when running tomcat.=A0 -----Original Message----- From: web...@li... [mailto:web...@li...]On Behalf Of kea...@na... Sent: Monday, November 25, 2002 11:39 AM To: ste...@ea... Cc: web...@li... Subject: RE: [WebMacro-user] WebMacro.properties question > -----Original Message-----=20 > From: web...@li...=20 > [mailto:web...@li...]On Behalf Of Eric B. > Ridge=20 > Sent: Monday, November 25, 2002 10:18 AM=20 > To: Steve Vu=20 > Cc: web...@li...=20 > Subject: Re: [WebMacro-user] WebMacro.properties question=20 >=20 >=20 > On Monday, November 25, 2002, at 02:43=A0 AM, Steve Vu wrote:=20 > > Hi there,=20 > >=20 > > I am using Tomcat4.1 and have placed the WebMacro.properties file=20 > > under my=20 > > c:\Tomcat 4.1\webapps\moj directory (the webroot for the=20 > application).=20 > >=A0 The=20 > > contents are as follows:=20 > >=20 > > TemplatePath=3D"c:\Tomcat 4.1\webapps\moj"=20 > >=20 > > However, when I try load a page onto the browser, I get an=20 > error about=20 > > webmacro not being able to find the requested template.=A0 Am=20 > I missing=20 > > something here?=A0 Is the space in the directory name causing any=20 > > problems?=20 > > Forward or Backward slash issues?=20 >=20 > Are you subclassing WMServlet?=A0 Which template?=A0 What error = message?=A0=20 > Where is it located?=A0 In a servlet 2.3 environment when subclassing=20 > WMServlet, templates need to be in your webroot.=20 Is this a known issue?=A0 If so we should document it somewhere.=20 Anyway the Web app context root should be where WM looks by default, so you shouldn't need to configure a template path at all.=A0 Be sure to check the log for error messages, also make sure you don't have an old version of WM -- the original 1.0 release had a Tomcat bug. Keats=20 > eric=20 >=20 >=20 >=20 > -------------------------------------------------------=20 > This sf.net email is sponsored by:ThinkGeek=20 > Welcome to geek heaven.=20 > http://thinkgeek.com/sf=20 > _______________________________________________=20 > Webmacro-user mailing list=20 > Web...@li...=20 > https://lists.sourceforge.net/lists/listinfo/webmacro-user=20 >=20 |
From: Matthew I. <ma...@se...> - 2002-11-25 17:00:40
|
RE: [WebMacro-user] WebMacro.properties questionYou need to put it in the WEB-INF subdirectory of your web root folder. That is automatically part of your search path via the classloader when running tomcat. -----Original Message----- From: web...@li... [mailto:web...@li...]On Behalf Of kea...@na... Sent: Monday, November 25, 2002 11:39 AM To: ste...@ea... Cc: web...@li... Subject: RE: [WebMacro-user] WebMacro.properties question > -----Original Message----- > From: web...@li... > [mailto:web...@li...]On Behalf Of Eric B. > Ridge > Sent: Monday, November 25, 2002 10:18 AM > To: Steve Vu > Cc: web...@li... > Subject: Re: [WebMacro-user] WebMacro.properties question > > > On Monday, November 25, 2002, at 02:43 AM, Steve Vu wrote: > > Hi there, > > > > I am using Tomcat4.1 and have placed the WebMacro.properties file > > under my > > c:\Tomcat 4.1\webapps\moj directory (the webroot for the > application). > > The > > contents are as follows: > > > > TemplatePath="c:\Tomcat 4.1\webapps\moj" > > > > However, when I try load a page onto the browser, I get an > error about > > webmacro not being able to find the requested template. Am > I missing > > something here? Is the space in the directory name causing any > > problems? > > Forward or Backward slash issues? > > Are you subclassing WMServlet? Which template? What error message? > Where is it located? In a servlet 2.3 environment when subclassing > WMServlet, templates need to be in your webroot. Is this a known issue? If so we should document it somewhere. Anyway the Web app context root should be where WM looks by default, so you shouldn't need to configure a template path at all. Be sure to check the log for error messages, also make sure you don't have an old version of WM -- the original 1.0 release had a Tomcat bug. Keats > eric > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Webmacro-user mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/webmacro-user > |
From: <kea...@na...> - 2002-11-25 16:37:35
|
> -----Original Message----- > From: web...@li... > [mailto:web...@li...]On Behalf Of Eric B. > Ridge > Sent: Monday, November 25, 2002 10:18 AM > To: Steve Vu > Cc: web...@li... > Subject: Re: [WebMacro-user] WebMacro.properties question > > > On Monday, November 25, 2002, at 02:43 AM, Steve Vu wrote: > > Hi there, > > > > I am using Tomcat4.1 and have placed the WebMacro.properties file > > under my > > c:\Tomcat 4.1\webapps\moj directory (the webroot for the > application). > > The > > contents are as follows: > > > > TemplatePath="c:\Tomcat 4.1\webapps\moj" > > > > However, when I try load a page onto the browser, I get an > error about > > webmacro not being able to find the requested template. Am > I missing > > something here? Is the space in the directory name causing any > > problems? > > Forward or Backward slash issues? > > Are you subclassing WMServlet? Which template? What error message? > Where is it located? In a servlet 2.3 environment when subclassing > WMServlet, templates need to be in your webroot. Is this a known issue? If so we should document it somewhere. Anyway the Web app context root should be where WM looks by default, so you shouldn't need to configure a template path at all. Be sure to check the log for error messages, also make sure you don't have an old version of WM -- the original 1.0 release had a Tomcat bug. Keats > eric > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Webmacro-user mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/webmacro-user > |
From: Eric B. R. <eb...@tc...> - 2002-11-25 15:19:00
|
On Monday, November 25, 2002, at 02:43 AM, Steve Vu wrote: > Hi there, > > I am using Tomcat4.1 and have placed the WebMacro.properties file > under my > c:\Tomcat 4.1\webapps\moj directory (the webroot for the application). > The > contents are as follows: > > TemplatePath="c:\Tomcat 4.1\webapps\moj" > > However, when I try load a page onto the browser, I get an error about > webmacro not being able to find the requested template. Am I missing > something here? Is the space in the directory name causing any > problems? > Forward or Backward slash issues? Are you subclassing WMServlet? Which template? What error message? Where is it located? In a servlet 2.3 environment when subclassing WMServlet, templates need to be in your webroot. eric |
From: Eric B. R. <eb...@tc...> - 2002-11-25 15:17:24
|
On Monday, November 25, 2002, at 03:21 AM, Marc van de Geijn wrote: > First of all: I'm new to WebMacro (using it for a week now) and the > more I > get to know it, the more I like it. Great job! We're glad you like it. > What I'm trying to do is: At one side there are the WebMacro classes > for > processing the Web requests and responses, on the other the Jetgen > classes > (http://www.jetools.com) for access to the database. > > I've got both up and running. Somehow I want to make the conversion of > the > data from the jetgen classes into the WebMacro classes easy. I was > thinking > about subclassing the WebContext class to add methods to do just that. > I > already have a subclass of WMServlet to do some basic stuff with form > data. You don't really want to subclass WebContext. Instead, you want to make helper classes or tools (by implementing org.webmacro.ContextTool and configuring it via webmacro.properties). If you have some kind of Jetgen tool, you can use it via your templates like this: $Jetgen.Records $Jetgen.LastQuery $Jetgen.Whatever ## i've never used Jeetgen, so I don't really know what it does. :) And from your sevlet code, you can access your Jetgen tool like this: JetgenTool jetgen = (JetgenTool) context.get("Jetgen"); jetgen.getRecords(); jetgen.getLastQuery(); jetgen.getWhatever(); And if you don't like the ContextTool approach, you can just .put the object into the context: context.put ("Jetgen", new JetgenTool()); > The problem is: there are so many final classes, that I'm wondering if > it is > possible to do this. Especially the newInstance method. Can somebody > give me > tips on how to do this so I can use that WebContext subclass in the > WMServlet subclass I've already created? Or is there some other > approach > somebody can recommend for this problem? Btw, there is already an http request form tool (org.webmacro.servlet.FormTool) that is configured by default. Access it from your templates as $Form, and from your code as: servletContext.getForm() Lots of things in WM are final on purpose. The idea of WM is not to allow you to directly extend and subclass it, but to allow you to extend its functionality by creating tools that aren't (really) specific to WebMacro... and to use your existing classes and objects w/o change. This way, WebMacro stays focused on what it does best: template rendering, and you can focus on your application w/o worrying about implementation details of WM. eric |