[opencms-dev] Custom Properties dialog not working

jack at futaz.co.za jack at futaz.co.za
Fri Jun 30 09:04:19 CEST 2006


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



More information about the opencms-dev mailing list