On Wed, May 31, 2000 at 08:08:20PM -0500, dave bryson wrote:
> On Wed, 31 May 2000, you wrote:
> > As regards getting webmacro stuff finished off, I'm just finishing off
> > the $pageAttributes stuff, and I also have a formatting tool to go into the
> > context which formats dates and arrays into text for use in a template.
> > I'll post some code tomorrow with luck.
>
> Most excellent!
Okay I've put the code in a zip file at:
http://rewind.somacity.com/wmcode.zip
There's two new Java files:
WebMacroPageAttributes.java:
A class that allows setting of various page attributes from WM
templates. I decided in the end to put it in the context as '$page' -
less letters to mistype for template authors :)
WebMacroFormatter.java:
A class that allows formatting of dates and lists from WM templates.
I've arranged that this is placed in the context by default - this
doesn't necessarily need to be so, but I find it very generally useful,
and there may be other string formatting tasks that the class could be
extended to perform.
(there's also wmexample.wm and Wmexample.java which are just a template
and screen pair with some silly examples of use of this stuff)
Also there's the following patches:
TurbineWebMacroService.diff:
Puts the new objects in the WebContext
SelectorBox.diff:
While I was in the area I added a setSize() method to SelectorBox so
that template authors can write $selectBox.setSize(5) instead of
$selectBox.toString(5) which IMO is a bit obscure.
(also AddTitle should be deprecated and eventually removed as its
functionality is superceded by WebMacroPageAttributes)
I hope this stuff hits the spot :)
Sean
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]