<br><br>---------- Forwarded message ----------<br><span class="gmail_quote">From: <b class="gmail_sendername">Andy Bicksbo</b> <<a href="mailto:schlachtzeuger@gmail.com">schlachtzeuger@gmail.com</a>><br>Date: 05.11.2006
 15:47<br>Subject: Re: [opencms-dev] I_CmsModuleAction<br>To: ruben malchow <<a href="mailto:r_malchow@web.de">r_malchow@web.de</a>><br><br></span>
<div>hi</div>
<div>How can i combine a with b my it seems clear for someone outside there,...,ok this is all serious buisness, no time for joking..., i knew that before but i'm looking for an opencms object, where the iclasses with the interface get initialized and may also get stored  
<br><br>Andy</div>
<div> </div>
<div><span class="gmail_quote">2006/11/5, ruben malchow <<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:r_malchow@web.de" target="_blank">r_malchow@web.de</a>>:</span> 
<div><span class="e" id="q_10eb8968c21a1254_1">
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div text="#000000" bgcolor="#ffffff"><br>hello andy, ...<br><br>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. 
<br><br>a.) to store the reference to CmsObject that is being passed to the initialize() method, you could do something like this:<br><br>       <br><tt>    public class BlahAction extends A_CmsModuleAction {<br>       <br>
        private CmsObject co;<br><br>        [...]<br><br>        public void initialize(<br>            CmsObject _co, <br>            CmsConfigurationManager _ccm, <br>            CmsModule _cm) {<br>           <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://this.co/" target="_blank">
this.co</a> = _co;<br>        }<br>    }<br><br></tt>b.) to get a reference to the module's instance, you could simply do something like this:<br><br><tt>    public class BlahAction extends A_CmsModuleAction {<br>       <br>
        private static </tt><tt>BlahAction </tt><tt>instance;<br><br></tt><tt>        public void initialize(...) {<br>            instance=this;  <br>        }<br></tt><tt>       <br>        public static </tt><tt>BlahAction get 
</tt><tt>BlahAction() {<br>            return instance;  <br></tt><tt>        }<br>    }<br></tt><tt>   <br></tt>you will have to check the return value of getBlahAction, though. if the modules hasn't been initialized properly, it will be null. 
<br><br>this concludes our lesson for today. in the next session, we will try to combine a.) and b.) ...<br><br>:)<br><br>.rm<br><br><br><br>Andy Bicksbo schrieb: 
<blockquote cite="http://midc67d43dd0611041936k6727c12awa1f4048b09c18941@mail.gmail.com" type="cite">
<div><span>Hi <br>Does somebody may now how or where to store these instantiated Object (at <br>initialize of ModuleActionHandler) for later use? <br>That whould help me alot <br>thx <br>andy <br><br><br>2006/11/4, Jonathan Woods 
<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:jonathan.woods@scintillance.com" target="_blank"><jonathan.woods@scintillance.com></a>: <br>
<blockquote type="cite"><br>Or if you're not packaging up the module as a JAR, the XML which Ruben <br>gives <br>may be incorporated directly in opencms-modules.xml. <br><br>Jon <br><br>-----Original Message----- <br>From: 
<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:opencms-dev-bounces@opencms.org" target="_blank">opencms-dev-bounces@opencms.org</a> <br>[<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:opencms-dev-bounces@opencms.org" target="_blank">
 mailto:opencms-dev-bounces@opencms.org</a>] On Behalf Of ruben malchow <br>Sent: 04 November 2006 18:44 <br>To: The OpenCms mailing list; <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:schlachtzeuger@gmail.com" target="_blank">
schlachtzeuger@gmail.com</a> <br>Subject: Re: [opencms-dev] I_CmsModuleAction <br><br><br>hi andy, <br><br>try putting this in your module's manifest file: <br><br>[...] <br>   <module> <br>       <name>youModuleName</name> 
<br>       <nicename>Your Nice Module Name</nicename> <br>       <class>com.foo.bar.bar.YourCmsModuleActionImpl</class> <br>       [..] <br>   </module> <br>[...] <br><br>.rm <br><br>> Hi all 
<br>> Has anybody some expirience with this and could explain some basics? <br>> I made a new Module in Opencms called com.me.doit i have several <br>> package in the jar file, but the package with Class, which implements 
<br>> the I_CmsModuleAction is called "com.me.doit" and the class <br>> "AtStartup" <br>> The imput field called Action class at the Module edit screen i set to <br>> com.me.doit.AtStartup AtStartup implements this interface and at the 
<br>> initialize Method i try to mkdir something, but somehow the initialize <br>> method is never invoked. <br>> Can anybody plz help me... <br>> -How to name packages and the Module <br>> -How to set the right stuff for Action class in the Module -Do i have 
<br>> to import or install the Module first or what else do i have to do? <br>> <br>> thx <br>> Andy <br>> <br>> ---------------------------------------------------------------------- <br>> -- <br>> 
<br>> <br>> _______________________________________________ <br>> This mail is sent to you from the opencms-dev mailing list To change <br>> your list options, or to unsubscribe from the list, please visit <br>
> <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.opencms.org/mailman/listinfo/opencms-dev" target="_blank">http://lists.opencms.org/mailman/listinfo/opencms-dev</a> <br><br><br>_______________________________________________ 
<br>This mail is sent to you from the opencms-dev mailing list To change your <br>list options, or to unsubscribe from the list, please visit <br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.opencms.org/mailman/listinfo/opencms-dev" target="_blank">
http://lists.opencms.org/mailman/listinfo/opencms-dev</a> <br><br><br><br>_______________________________________________ <br>This mail is sent to you from the opencms-dev mailing list <br>To change your list options, or to unsubscribe from the list, please visit 
<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.opencms.org/mailman/listinfo/opencms-dev" target="_blank">http://lists.opencms.org/mailman/listinfo/opencms-dev</a> <br><br></blockquote><br>
</span></div><pre><hr width="90%" size="4"><span>

_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.opencms.org/mailman/listinfo/opencms-dev" target="_blank">http://lists.opencms.org/mailman/listinfo/opencms-dev</a></span></pre></blockquote><br>
 </div></blockquote></span></div></div><br>