[opencms-dev] I_CmsModuleAction

Christian Steinert christian_steinert at web.de
Sun Nov 5 14:26:18 CET 2006


ruben malchow schrieb:
>
> hello andy, ...
>
> the core of opencms is a singleton, and thus it is only instantiated
> once, and it only creates one instance of the module class, too. it
> also holds a reference to the module action object, so it will not
> disappear.
>
> a.) to store the reference to CmsObject that is being passed to the
> initialize() method, you could do something like this:
>
>       
>     public class BlahAction extends A_CmsModuleAction {
>       
>         private CmsObject co;
>
>         [...]
>
>         public void initialize(
>             CmsObject _co,
>             CmsConfigurationManager _ccm,
>             CmsModule _cm) {
>            this.co = _co;
>         }
>     }
this is possible, but you should be careful about what you do with this
cmsObject. You should not access any request-related things, because
there is probably no meaningful information in the request context of
that cms object.
Also, I don't know, which user, project and site root would be set for
that cmsObject

christian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20061105/7328a703/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3269 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20061105/7328a703/attachment.bin>


More information about the opencms-dev mailing list