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. ;-) |