[opencms-dev] getting CmsObject in a static way?

Thomas M�rz thomasmaerz at gmx.de
Thu Aug 5 13:31:02 CEST 2004


Christian Poecher <Poecher at gmx.net> writes:

> I wonder, if I can strip the sigature of my methods of the CmsObject
> and access it via a static method. Maybe like accessing a Singleton.
>
> Any suggestions how to design it?

Read this thread [1] and take a look at the current CVS Head.

,----[ Alexander Kandzior ]
| If you use the current "stable" release, there is no easy way (without core
| code modifications) to get a CmsObject.
| 
| This has changed in the current development version (CVS HEAD). In this
| version you can get access to a CmsObject using the OpenCms singleton Object
| (e.g. using method OpenCms.initCmsObject(String unsername). This just
| requires that OpenCms shares an application context with your application.
`----


HTH


[1] http://mail.opencms.org/pipermail/opencms-dev/2004q3/012393.html




More information about the opencms-dev mailing list