[opencms-dev] Setting the correct site inside event listener

a.westermann at alkacon.com a.westermann at alkacon.com
Mon Sep 7 14:37:17 CEST 2009


Hi Marc & Paul-Inge,

also try to use your own CmsObject in your event listener instead of 
modifying the one given to your module action class directly. 
Implementation of I_CmsEventListener and extension of A_CmsModuleAction  :

   /**
      * @see 
org.opencms.module.A_CmsModuleAction#initialize(org.opencms.file.CmsObject, 
org.opencms.configuration.CmsConfigurationManager, 
org.opencms.module.CmsModule)
      */
     public void initialize(CmsObject adminCms, CmsConfigurationManager 
configurationManager, CmsModule module) {
m_myCms =  OpenCms.initCmsObject(cms)

...
}


Hope my guess about what you are trying to do was right. If so and you 
weren't already on this track, read more here:

http://opencms-wiki.org/Example_Actionclass


Kind Regards,
Achim.

-------------------
Achim Westermann

Alkacon Software GmbH  - The OpenCms Experts
http://www.alkacon.com - http://www.opencms.org




More information about the opencms-dev mailing list