From: Alistair Y. <ali...@sm...> - 2005-07-14 10:05:51
|
nice one! that'll do. My only concern was it caused NPE with style_0/ recycler/main.html. That's nothing to do with the template compilation problem. It's a nice enhancement for dynamic localisation though. Before you commit, can you make sure you're not seeing any NPE with non localised templates? Who's going to update the ant task to fix the template compilation problem? Alistair On 14 Jul 2005, at 10:57, Matthew Buckett wrote: > Alistair Young wrote: > >> yep, no way round that. literals are passed to Facility methods so >> I can't pass a Localiser method call instead of a string. It has >> to be a java.lang.String that gets passed to Facility. It's a >> fundamental i18n limitation of bod. You need to recompile the >> template if you change a Facility literal string in a properties >> file. For all other "normal" content, i.e. content that the >> template class displays, you don't need to recompile if you >> change the properties file. >> Templates delegating content display to Facility causes the problem. >> > > The reason I orginally wrote the patch is I couldn't see any > support for dynamically changing and I didn't look inside > getCharacterData(). > > With my patch when you compile the call from default/applettop.html: > > <call> > <target method="variable"><variable name="facility"/></target> > <parameters> > <variable name="request"/> > <variable name="writer"/> > <literal type="String"> > <localise id="page.title.text"/> > </literal> > </parameters> > </call> > > you get this in the Java: > > facility .variable( request , writer , res.getString > ("page.title.text") ); > > otherwise you get the hardcoded string. > > facility .variable( request , writer , "title" ); > > Is this better? > > -- > +--Matthew Buckett-----------------------------------------+ > | VLE Developer, Learning Technologies Group | > | Tel: +44 (0) 1865 283660 http://www.oucs.ox.ac.uk/ | > +------------Computing Services, University of Oxford------+ > > > ------------------------------------------------------- > This SF.Net email is sponsored by the 'Do More With Dual!' webinar > happening > July 14 at 8am PDT/11am EDT. We invite you to explore the latest in > dual > core and dual graphics technology at this free one hour event > hosted by HP, AMD, and NVIDIA. To register visit http://www.hp.com/ > go/dualwebinar > _______________________________________________ > Bodington-developers mailing list > Bod...@li... > https://lists.sourceforge.net/lists/listinfo/bodington-developers > |