From: Keats <ke...@xa...> - 2004-02-27 19:04:34
|
I glanced briefly at the code ... I can see that you have a bit of a job ahead. In WebmacroTemplate, try just replacing: template.write(fw, (WebContext)templateContext.getContext()); with WebContext wc = (WebContext)templateContext.getContext(); template.write(wc.getRequest().getOutputStream(), wc); If you already have your content rendered to a String, than you can just write straight to the request: request.getWriter(expandedTemplate); You should be able to rip out all the various wrapper classes that use the FastWriter. Hope this helps. Keats ----- Original Message ----- From: "Tim Pizey" <ti...@pa...> To: <web...@li...> Sent: Friday, February 27, 2004 11:24 AM Subject: Re: [WebMacro-user] Problems upgrading Melati to WebMacro 2.0b1 On Friday 27 February 2004 4:04 pm, Keats wrote: > I'd be willing to change the default behaviour of $Form to return empty > strings instead of nulls, as this seems more useful. Any objections? I may not have correctly analysed what is causing the new behaviour, but it seems good not to change the way things work. > I would also add a method to check if a parameter exist, e.g., > $Form.Exists.formVar. That seems useful. > btw, what problems are you having with FastWriter? You should be able to > just ignore it altogether with 2.0. Would that that were true. Tim Joyce 'understood' the FastWriter and used it pervasively. In trying to remove it I have broken everything. The first symptom [1] was given Template A abd templets b and c evaluated within it I got output bcA I then fiddled some more. The problem seems to be that org.webmacro.Template no longer renders to a FastWriter but to an OutputStream, which breaks my rendering to a string buffer, as a StringWriter does not have an OutputStream ???? http://melati.org/cgi-bin/cvsweb.cgi/melati/src/org/melati/template/webmacro/WebmacroTemplate.java.diff?r1=1.8&r2=1.9 shows you the 1st change I made to get to [1] above. I could really do with some help. cheers timp ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id56&alloc_id438&op=ick _______________________________________________ Webmacro-user mailing list Web...@li... https://lists.sourceforge.net/lists/listinfo/webmacro-user |