AW: [opencms-dev] user defined template classes

Alexander Lucas Alexander.Lucas at framfab.de
Mon Nov 6 18:59:57 CET 2000


Hi Sascha,

you are trying to add new methods callable by a <METHOD> tag.
Theses methods will be called from the template engine using
the java.lang.reflect.* package. The number and type of all parameters
are fixed, because otherwise the reflect package couldn't find 
the methods. 

The only way to pass arguments to this methods is putting them 
into the XML tags, like
<METHOD name="myMethod">myArguments</METHOD>

In your user-defined method, the parameter tagcontent will give
you access to this value. 

Best regards
Alexander Lucas

mailto:alexander.lucas at framfab.de


-----Ursprüngliche Nachricht-----
Von: Franke.S at zdf.de [mailto:Franke.S at zdf.de]
Gesendet: Montag, 6. November 2000 16:18
An: opencms-dev at www.opencms.com
Betreff: [opencms-dev] user defined template classes


Hi everybody,

For several days I'm trying to create my own template classes and methods. I
tried the "CmsHello" Class and got it working. Now I would like to add my
own methods to this class, because I would like to get access to an
SQL-server for creating dynamic content.
There are 4 parameters that the method getHello expects:CmsObject cms,
String tagcontent, A_CmsXmlContent doc and Object userObject.
When I try to add further parameters to this method, it can't be found by
Open CMS when I request a webside, which uses the class CmsHello. Also a
method without any parameters can't be found. Do I always have to use the 4
parameters I mentioned above and how can I add further parameters. Perhaps
somebody of the Open CMS developers can help me because I tried to get some
advise from the Open CMS mailing list but nobody answered.
Any help would be appreciated. Thanks.

Sascha Franke
ZDF-Mainz
Mail: Franke.S at zdf.de




More information about the opencms-dev mailing list