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 > > > |