[opencms-dev] Re: opencms-dev Digest, Vol 99, Issue 5
Jack
jack at futaz.co.za
Tue Jul 4 07:52:21 CEST 2006
Hi Tom
Thanks for the response. I not sure I explained myself clearly, but I did
manage to get the Custom Properties dialog to work. I was however not able
to get both the templateone and my custom properties dialog to work at the
same time. Which ever custom properties dialog was defined last in the
config file (opencms-workplace.xml) worked fine, the other did not work.
Regards
Jack
>
> Message: 28
> Date: Fri, 30 Jun 2006 09:18:47 +0200
> From: Tom?? Ad?mek <tomas.adamek at qbizm.cz>
> Subject: Re: [opencms-dev] Custom Properties dialog not working
> To: The OpenCms mailing list <opencms-dev at opencms.org>
> Message-ID: <44A4D057.4050609 at qbizm.cz>
> Content-Type: text/plain; charset=ISO-8859-2; format=flowed
>
>
> Hey, I played with this on OpenCms 6.0.2 rls time ago, so maybe it works
> little different on new rlses, but - the only way, how could I make the
> another custom dialog to show, was:
>
> create my_custom_dialog_clss extends
> org.opencms.frontend.templateone.CmsPropertyTemplateOne, and in this
> class is some method for checkin, if the dialog should be showed or
> not, and if not i called super for parent template1 method. Dont forget
> to replace "old template one method" from config file and add there your
> own.
>
> I dont know if this acces is fine, but it works for me, and as I
> remebered, I had same problems as u have now, and after all tests I
> solved it like this.
>
> jack at futaz.co.za napsal(a):
>> Hi All
>>
>> I would like to know if it is possible to add an additional custom
>> properties dialog similar to the properties dialog for TemplateOne, but
>> still keeping the dialog page of TemplateOne.
>>
>> I have created a new module with a template and some java classes (which
>> are a modification of the TemplateOne classes including a
>> CmsPropertyTemplateTwo class). I also copied the
>> ‘properties.jsp’ file in the dialog file in TemplateOne
>> module
>> into my module. I then added the following to the
>> ‘opencms-workplace.xml’ file:
>>
>> <dialoghandlers>
>> <dialoghandler class="org.opencms.workplace.commons.CmsDelete"/>
>> <dialoghandler class="org.opencms.workplace.commons.CmsLock"/>
>> <dialoghandler
>> class="org.opencms.frontend.templateone.CmsPropertyTemplateOne"/>
>> <dialoghandler
>> class="com.MyOrganization.MySite.CmsPropertyTemplateTwo"/>
>> </dialoghandlers>
>>
>>
>> I then set the ‘template’ property of my new site
>> (/sites/mysite/) to point to the new module and template (eg.
>> /system/modules/com.MyOrganization.MySite/templates/default/ ). So after
>> a
>> restart I see the nice new custom properties page for MySite files and
>> folders, but now the TemplateOne properties no longer displays.
>>
>> Then as a test I swapped the <dialoghandler /> elements in the xml file
>> as
>> follows:
>>
>> <dialoghandlers>
>> <dialoghandler class="org.opencms.workplace.commons.CmsDelete"/>
>> <dialoghandler class="org.opencms.workplace.commons.CmsLock"/>
>> <dialoghandler
>> class="com.MyOrganization.MySite.CmsPropertyTemplateTwo"/>
>> <dialoghandler
>> class="org.opencms.frontend.templateone.CmsPropertyTemplateOne"/>
>> </dialoghandlers>
>>
>>
>> And now the TemplateOne properties dialog works again but the new one
>> doesn’t work anymore. Is there something I’m missing or is
>> it
>> not possible to have more than one custom properties dialog?
>>
>> Regards,
>> jack
>>
>> _______________________________________________
>> 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
>> http://lists.opencms.org/mailman/listinfo/opencms-dev
>
> --
> Tomas Adamek Qbizm technologies, a.s.
> analyst-developer ... the art of software.
> ____________________________________________________________________
> www.qbizm-technologies.cz www.qbizm.cz www.qbizm-services.cz
>
More information about the opencms-dev
mailing list