KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > info > magnolia > module > admininterface > dialogs > NodeNameControl


1 /**
2  *
3  * Magnolia and its source-code is licensed under the LGPL.
4  * You may copy, adapt, and redistribute this file for commercial or non-commercial use.
5  * When copying, adapting, or redistributing this document in keeping with the guidelines above,
6  * you are required to provide proper attribution to obinary.
7  * If you reproduce or distribute the document without making any substantive modifications to its content,
8  * please use the following attribution line:
9  *
10  * Copyright 1993-2005 obinary Ltd. (http://www.obinary.com) All rights reserved.
11  *
12  */

13 package info.magnolia.module.admininterface.dialogs;
14
15 import info.magnolia.cms.core.Content;
16 import info.magnolia.cms.gui.dialog.DialogStatic;
17
18 import javax.jcr.RepositoryException;
19 import javax.servlet.http.HttpServletRequest JavaDoc;
20 import javax.servlet.http.HttpServletResponse JavaDoc;
21
22
23 /**
24  * @author Philipp Bracher
25  * @version $Revision: 6341 $ ($Author: philipp $)
26  */

27 public class NodeNameControl extends DialogStatic {
28
29     /**
30      * Use a bold label
31      */

32     public String JavaDoc getLabel() {
33         return "<strong>" + this.getMessage(super.getLabel()) + "</strong>";
34     }
35
36     /**
37      * Set the nodes name as value
38      */

39     public void init(HttpServletRequest JavaDoc request, HttpServletResponse JavaDoc response, Content storageNode, Content configNode)
40         throws RepositoryException {
41         super.init(request, response, storageNode, configNode);
42         if (storageNode != null) {
43             this.setValue(storageNode.getName());
44         }
45     }
46 }
47
Popular Tags