[opencms-dev] How to customize ADE menu on a containerpage ?

Tobias Herrmann t.herrmann at alkacon.com
Fri May 17 13:51:03 CEST 2013


Hi Antoine,

the classes org.opencms.gwt.client.* are part of the client-side JavaScript code included with the OpenCms release. Without rebuilding the org.opencms.ade.containerpage module, you will not be able to add your own classes there. But you can reference a JSP in the context menu configuration that will 
be displayed in an iFrame overlay dialog when called. Use the 'uri' attribute to specify your dialog JSP. Like this:

<entry key="My_dialog_MESSAGEKEY" name="org.opencms.gwt.client.ui.contextmenu.CmsContextMenuDialog" uri="commons/myDialog.jsp" params="dialogHeight=600|dialogWidth=800" rule="containerpage"/>

Take a look at https://github.com/alkacon/opencms-core/blob/branch_8_5_x/src-gwt/org/opencms/gwt/client/ui/contextmenu/CmsContextMenuDialog.java. This class will display the dialog  for you.

Greetings, Tobias

--

Alkacon Software GmbH - The OpenCms Experts

http://www.alkacon.com
http://www.opencms.org

Am 17.05.2013 12:20, schrieb Antoine PINEAU:
> Hello all,
>
> How can we add a new button on ADE menu on a containerpage ?
>
> We managed to customize a context menu through the config file opencms-modules.xml :
>
> <explorertypename=/"containerpage"/ key=/"fileicon.containerpage"/ icon=/"containerpage.png"/ bigicon=/"containerpage_big.png"/ reference=/"xmlcontent"/>
>
> <editoptions>
>
> <contextmenu>
>
>              <entrykey=/"GUI_EXPLORER_CONTEXT_CUSTOM_0"/ uri=/"/system/modules/com.eurelis.opencms.custom/elements/custom.jsp"/ rule=/"standard"//>
>
> We saw that in that same file, we have the ADE buttons:
>
> <entrykey=/"GUI_EXPLORER_CONTEXT_SEO_0"/ name=/"org.opencms.gwt.client.ui.contextmenu.CmsOpenSeoDialog"/ rule=/"containerpage"//>
>
> But those classes (/org.opencms.gwt.client.*/) seem NOT to be compiled on the OpenCms webapp (neither .class, nor .jar, nor java code in .jsp) and when trying to add a custom entry, the custom code does not seem to be executed at all.
>
> So can you help me on customizing the ADE buttons ?
>
> What is the best practice for that ?
>
> Thanks in advance.
>
> --
>
> Antoine
>
>
>
> _______________________________________________
> 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/cgi-bin/mailman/listinfo/opencms-dev
>
>
>



More information about the opencms-dev mailing list