[opencms-dev] CmsXmlTemplate class - getProperty()
Rod Thorburn
rod.thorburn at pavtech.co.nz
Tue Oct 22 22:20:25 CEST 2002
Thanks Benjamin. Nice reply. Of course - it works fine, and adds real value
to my development efforts.
Regards.
Rod
-----Original Message-----
From: Benjamin Klatt [mailto:benjamin at recordstores.de]
Sent: Tuesday, October 22, 2002 7:17 PM
To: opencms-dev at www.opencms.org
Subject: AW: [opencms-dev] CmsXmlTemplate class - getProperty()
Hi Rod,
the syntax for method-calls is:
<METHOD name="xy" /> or with paramter
<METHOD name="xy">param</METHOD>
If you would like to call the getPropert-method you have to take the second
one and to ask for a property that your ressourcetype supports.
For example in a page you can use: <METHOD
nama="getProperty">NavPos</METHOD>
If you need your own properties you have to change to the
administration-view, go to the "properties management" and add a new
property to the ressourcetype. After this you can go to the page or whatever
it is and choose to specifiy this new property.
br
Benjamin Klatt
>>-----Ursprüngliche Nachricht-----
>>Von: owner-opencms-dev at www.opencms.org
>>[mailto:owner-opencms-dev at www.opencms.org]Im Auftrag von Rod Thorburn
>>Gesendet: Dienstag, 22. Oktober 2002 01:20
>>An: 'opencms-dev at www.opencms.org'
>>Betreff: RE: [opencms-dev] CmsXmlTemplate class - getProperty()
>>
>>
>>Has anybody successfully called this method from a tempalate file? If so,
>>please advise the syntax used.
>>The OpenCms Documentation (version 4.6) page 61 lists the standard methods
>>of the CmsXmlTemplate class. The description for getProperty()
>>reads "Takes
>>a property name as a parameter and returns the value of this property .."
>>
>>Comments above the actual method in the class state "This method can be
>>called using <code><METHOD name="getProperty"></code> in
>>the template
>>file".
>>
>>However, if I insert ]]><method name="getProperty(Date)"/><![CDATA[ in a
>>template, the output in the page constructed shows the error:
>>contenttemplate] ??? [CmsException]: 23 Could not call user
>>method. Detailed
>>Error: User method getProperty(Date) was not found in class
>>com.opencms.template.CmsXmlTemplate..
>>
>>It would appear that passing the parameter value (Date) causes the error!
>>But how else do you pass the parameter?
>>
>>I am aware that I could access Properties by using a JSP or JSTL
>>tag - but I
>>don't see the need if Properties can be extracted directly into an XML
>>template.
>>
>>Thanks.
>>
>>Rod
>>NOTICE: The information contained in this electronic mail message and any
>>attachments is confidential to Pavilion Technologies, Inc. or one of its
>>subsidiaries and may contain proprietary information or be legally
>>privileged. This message and any attachments are intended only for the
>>personal and confidential use of the designated recipient(s). If
>>you are not
>>the intended recipient or an agent responsible for delivering it to the
>>intended recipient, you are hereby notified that you have received this
>>message in error, and that any review, dissemination, distribution or
>>copying of this message and any attachments is unauthorised and strictly
>>prohibited. If you have received this message in error, please notify me
>>immediately by telephone and electronic mail, and delete this message, any
>>attachments, and all copies thereof. Thank you very much.
NOTICE: The information contained in this electronic mail message and any
attachments is confidential to Pavilion Technologies, Inc. or one of its
subsidiaries and may contain proprietary information or be legally
privileged. This message and any attachments are intended only for the
personal and confidential use of the designated recipient(s). If you are not
the intended recipient or an agent responsible for delivering it to the
intended recipient, you are hereby notified that you have received this
message in error, and that any review, dissemination, distribution or
copying of this message and any attachments is unauthorised and strictly
prohibited. If you have received this message in error, please notify me
immediately by telephone and electronic mail, and delete this message, any
attachments, and all copies thereof. Thank you very much.
More information about the opencms-dev
mailing list