KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > opencms > workplace > tools > searchindex > CmsOverviewSearchIndexDialog


1 /*
2  * File : $Source: /usr/local/cvs/opencms/src-modules/org/opencms/workplace/tools/searchindex/CmsOverviewSearchIndexDialog.java,v $
3  * Date : $Date: 2006/03/27 14:52:21 $
4  * Version: $Revision: 1.2 $
5  *
6  * This library is part of OpenCms -
7  * the Open Source Content Mananagement System
8  *
9  * Copyright (c) 2005 Alkacon Software GmbH (http://www.alkacon.com)
10  *
11  * This library is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU Lesser General Public
13  * License as published by the Free Software Foundation; either
14  * version 2.1 of the License, or (at your option) any later version.
15  *
16  * This library is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  * Lesser General Public License for more details.
20  *
21  * For further information about Alkacon Software GmbH, please see the
22  * company website: http://www.alkacon.com
23  *
24  * For further information about OpenCms, please see the
25  * project website: http://www.opencms.org
26  *
27  * You should have received a copy of the GNU Lesser General Public
28  * License along with this library; if not, write to the Free Software
29  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
30  */

31
32 package org.opencms.workplace.tools.searchindex;
33
34 import org.opencms.jsp.CmsJspActionElement;
35 import org.opencms.widgets.CmsDisplayWidget;
36 import org.opencms.workplace.CmsWidgetDialogParameter;
37
38 import javax.servlet.http.HttpServletRequest JavaDoc;
39 import javax.servlet.http.HttpServletResponse JavaDoc;
40 import javax.servlet.jsp.PageContext JavaDoc;
41
42 /**
43  *
44  * Dialog to overview search index in the administration view.<p>
45  *
46  * @author Achim Westermann
47  *
48  * @version $Revision: 1.2 $
49  *
50  * @since 6.0.0
51  */

52 public class CmsOverviewSearchIndexDialog extends A_CmsEditSearchIndexDialog {
53
54     /**
55      * Public constructor with JSP action element.<p>
56      *
57      * @param jsp an initialized JSP action element
58      */

59     public CmsOverviewSearchIndexDialog(CmsJspActionElement jsp) {
60
61         super(jsp);
62     }
63
64     /**
65      * Public constructor with JSP variables.<p>
66      *
67      * @param context the JSP page context
68      * @param req the JSP request
69      * @param res the JSP response
70      */

71     public CmsOverviewSearchIndexDialog(PageContext JavaDoc context, HttpServletRequest JavaDoc req, HttpServletResponse JavaDoc res) {
72
73         this(new CmsJspActionElement(context, req, res));
74     }
75
76     /**
77      * Creates the dialog HTML for all defined widgets of the named dialog (page).<p>
78      *
79      * This overwrites the method from the super class to create a layout variation for the widgets.<p>
80      *
81      * @param dialog the dialog (page) to get the HTML for
82      * @return the dialog HTML for all defined widgets of the named dialog (page)
83      */

84     protected String JavaDoc createDialogHtml(String JavaDoc dialog) {
85
86         StringBuffer JavaDoc result = new StringBuffer JavaDoc(1024);
87
88         result.append(createWidgetTableStart());
89         // show error header once if there were validation errors
90
result.append(createWidgetErrorHeader());
91
92         if (dialog.equals(PAGES[0])) {
93             // create the widgets for the first dialog page
94
result.append(dialogBlockStart(key(Messages.GUI_NAVTEXT_SEARCHINDEX_SHORT_0)));
95             result.append(createWidgetTableStart());
96             result.append(createDialogRowsHtml(0, 3));
97             result.append(createWidgetTableEnd());
98             result.append(dialogBlockEnd());
99         }
100
101         result.append(createWidgetTableEnd());
102         return result.toString();
103     }
104
105     /**
106      * @see org.opencms.workplace.CmsWidgetDialog#defaultActionHtmlEnd()
107      */

108     protected String JavaDoc defaultActionHtmlEnd() {
109
110         return "";
111     }
112
113     /**
114      * Creates the list of widgets for this dialog.<p>
115      */

116     protected void defineWidgets() {
117
118         super.defineWidgets();
119
120         // widgets to display in first block (like edit view)
121
addWidget(new CmsWidgetDialogParameter(m_index, "name", PAGES[0], new CmsDisplayWidget()));
122         addWidget(new CmsWidgetDialogParameter(m_index, "rebuildMode", PAGES[0], new CmsDisplayWidget()));
123         addWidget(new CmsWidgetDialogParameter(m_index, "locale", PAGES[0], new CmsDisplayWidget()));
124         addWidget(new CmsWidgetDialogParameter(m_index, "project", PAGES[0], new CmsDisplayWidget()));
125     }
126 }
Popular Tags