001: /*
002: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003: *
004: * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
005: *
006: * The contents of this file are subject to the terms of either the GNU
007: * General Public License Version 2 only ("GPL") or the Common
008: * Development and Distribution License("CDDL") (collectively, the
009: * "License"). You may not use this file except in compliance with the
010: * License. You can obtain a copy of the License at
011: * http://www.netbeans.org/cddl-gplv2.html
012: * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
013: * specific language governing permissions and limitations under the
014: * License. When distributing the software, include this License Header
015: * Notice in each file and include the License file at
016: * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
017: * particular file as subject to the "Classpath" exception as provided
018: * by Sun in the GPL Version 2 section of the License file that
019: * accompanied this code. If applicable, add the following below the
020: * License Header, with the fields enclosed by brackets [] replaced by
021: * your own identifying information:
022: * "Portions Copyrighted [year] [name of copyright owner]"
023: *
024: * Contributor(s):
025: *
026: * The Original Software is NetBeans. The Initial Developer of the Original
027: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
028: * Microsystems, Inc. All Rights Reserved.
029: *
030: * If you wish your version of this file to be governed by only the CDDL
031: * or only the GPL Version 2, indicate your decision by adding
032: * "[Contributor] elects to include this software in this distribution
033: * under the [CDDL or GPL Version 2] license." If you do not indicate a
034: * single choice of license, a recipient has the option to distribute
035: * your version of this file under either the CDDL, the GPL Version 2 or
036: * to extend the choice of license to its licensees as provided above.
037: * However, if you add GPL Version 2 code and therefore, elected the GPL
038: * Version 2 license, then the option applies only if the new code is
039: * made subject to such option by the copyright holder.
040: */
041: package org.netbeans.modules.visualweb.faces.dt_1_1.component.html;
042:
043: import org.netbeans.modules.visualweb.faces.dt_1_1.component.UIInputBeanInfoBase;
044: import java.beans.BeanDescriptor;
045: import java.util.Locale;
046: import java.util.ResourceBundle;
047: import com.sun.rave.designtime.Constants;
048: import org.netbeans.modules.visualweb.faces.dt.BeanDescriptorBase;
049:
050: public class HtmlInputHiddenBeanInfo extends UIInputBeanInfoBase {
051:
052: protected static ResourceBundle resources = ResourceBundle
053: .getBundle(
054: "org.netbeans.modules.visualweb.faces.dt_1_1.component.html.Bundle-JSF",
055: Locale.getDefault(), HtmlInputHiddenBeanInfo.class
056: .getClassLoader());
057:
058: public HtmlInputHiddenBeanInfo() {
059: beanClass = javax.faces.component.html.HtmlInputHidden.class;
060: iconFileName_C16 = "/org/netbeans/modules/visualweb/faces/dt_1_1/component/html/HtmlInputHidden_C16";
061: iconFileName_C32 = "/org/netbeans/modules/visualweb/faces/dt_1_1/component/html/HtmlInputHidden_C32";
062: iconFileName_M16 = "/org/netbeans/modules/visualweb/faces/dt_1_1/component/html/HtmlInputHidden_M16";
063: iconFileName_M32 = "/org/netbeans/modules/visualweb/faces/dt_1_1/component/html/HtmlInputHidden_M32";
064: }
065:
066: private BeanDescriptor beanDescriptor;
067:
068: public BeanDescriptor getBeanDescriptor() {
069:
070: if (beanDescriptor != null) {
071: return beanDescriptor;
072: }
073:
074: beanDescriptor = new BeanDescriptorBase(beanClass);
075: beanDescriptor.setDisplayName(resources
076: .getString("HtmlInputHidden_DisplayName"));
077: beanDescriptor.setShortDescription(resources
078: .getString("HtmlInputHidden_Description"));
079: beanDescriptor.setExpert(false);
080: beanDescriptor.setHidden(false);
081: beanDescriptor.setPreferred(false);
082: beanDescriptor.setValue(
083: Constants.BeanDescriptor.FACET_DESCRIPTORS,
084: getFacetDescriptors());
085: beanDescriptor.setValue(Constants.BeanDescriptor.HELP_KEY,
086: "projrave_ui_elements_palette_jsfstd_hidden_field");
087: beanDescriptor.setValue(Constants.BeanDescriptor.INSTANCE_NAME,
088: "hiddenField");
089: beanDescriptor.setValue(Constants.BeanDescriptor.IS_CONTAINER,
090: Boolean.FALSE);
091: beanDescriptor
092: .setValue(Constants.BeanDescriptor.PROPERTIES_HELP_KEY,
093: "projrave_ui_elements_propsheets_jsfstd_hidden_field_props");
094: beanDescriptor.setValue(
095: Constants.BeanDescriptor.PROPERTY_CATEGORIES,
096: getCategoryDescriptors());
097: beanDescriptor.setValue(Constants.BeanDescriptor.TAG_NAME,
098: "inputHidden");
099: beanDescriptor.setValue(Constants.BeanDescriptor.TAGLIB_PREFIX,
100: "h");
101: beanDescriptor.setValue(Constants.BeanDescriptor.TAGLIB_URI,
102: "http://java.sun.com/jsf/html");
103: beanDescriptor.setValue(
104: Constants.BeanDescriptor.TRAY_COMPONENT, Boolean.TRUE);
105:
106: return beanDescriptor;
107:
108: }
109:
110: }
|