[opencms-dev] Administration
Michael Moossen
m.moossen at alkacon.com
Mon May 30 10:08:30 CEST 2005
Hi, John!
> how can i make new objets to administrate?
if you mean: how to add a new tool to the administration view?
follow these steps:
1. create a jsp page mytool.jsp under /system/workplace/admin/mytools/
2. set the admintoolhandler-class property of your folder AND your file
to one of the I_CmsToolHandler implementing classes in the
org.opencms.workplace.tools or write your own (mainly for visibility and
enabled/disabled state checks), ie.
org.opencms.workplace.tools.CmsDefaultToolHandler
3. reinitialize the workplace
so you will obtain a new group of tools in the root of the administration view
with a single tool.
for more info see the javadoc for
org.opencms.workplace.tools.A_CmsToolHandler#setup(CmsObject, String).
and check the properties of other folders/files under /system/workplace/admin/
for building the jsp page you should extend a org.opencms.workplace.CmsDialog
class, the best is to use the new widget technology provided by the
CmsWidgetDialog and/or the A_CmsListDialog classes. for further info see the jps
pages for the scheduler: /system/workplace/admin/scheduler and the code of the
org.opencms.workplace.tools.scheduler package
you may want to write the jsp using another techs, for that the absolute minimum
to keep things working is:
<%@ page
buffer="none"
import="org.opencms.main.*,org.opencms.workplace.*" %>
<%
// initialize the workplace class
CmsDialog wp = new CmsDialog(pageContext, request, response);
if (wp.getAction()==CmsDialog.ACTION_CANCEL) {
wp.actionCloseDialog();
return;
}
%>
--
Regards
Michael Moossen
An der Wachsfabrik 13
50996 Köln
Tel: +49 2236 3826-0
Fax: +49 2236 3826-20
Email: m.moossen at alkacon.com
http://www.alkacon.com
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
More information about the opencms-dev
mailing list