KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > info > magnolia > cms > gui > control > Hidden


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.cms.gui.control;
14
15 import info.magnolia.cms.core.Content;
16
17
18 /**
19  * Hidden field.
20  * @author Vinzenz Wyser
21  * @version 2.0
22  */

23 public class Hidden extends ControlSuper {
24
25     public Hidden() {
26     }
27
28     public Hidden(String JavaDoc name, String JavaDoc value) {
29         super(name, value);
30     }
31
32     public Hidden(String JavaDoc name, String JavaDoc value, boolean saveInfo) {
33         super(name, value);
34         this.setSaveInfo(saveInfo);
35     }
36
37     public Hidden(String JavaDoc name, Content websiteNode) {
38         super(name, websiteNode);
39     }
40
41     public String JavaDoc getHtml() {
42         StringBuffer JavaDoc html = new StringBuffer JavaDoc();
43         html.append("<input type=\"hidden\""); //$NON-NLS-1$
44
html.append(" name=\"" + this.getName() + "\""); //$NON-NLS-1$ //$NON-NLS-2$
45
html.append(" id=\"" + this.getName() + "\""); //$NON-NLS-1$ //$NON-NLS-2$
46
html.append(" value=\"" + this.getValue() + "\""); //$NON-NLS-1$ //$NON-NLS-2$
47
html.append(" />"); //$NON-NLS-1$
48
html.append(this.getHtmlSaveInfo());
49         return html.toString();
50     }
51 }
52
Popular Tags