This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Description: Creator has property editors for common class types like String and Date, for JSF-specific types like ValueBinding and MethodBinding, and for primitives like int and long. However, when insync creates beans, and no editor is specified by a property, it allows NetBeans to supply the default, "backstop" editor. In most cases, however, these editors are not well-suited to the task. Insync should specify editors for well-known types, to free component authors from the burden of having to do this for every single property. Suggested Fix: Basic "backstop" support for the most common JSF property types could be provided by modifying the implementation of loadEditor() in org.netbeans.modules.visualweb.insync.live.SourceDesignProperty. If the property descriptor does not specify an editor, then use a Creator-specific editor for the property's type. If there is none, then fall back on the NetBeans editor, registered statically via the Java Beans PropertyEditorManager. For example: // If no editor loaded, attempt to load a Creator-specific, default editor appropriate // for the property type if (editor == null) { Class propertyType = this.getPropertyDescriptor().getPropertyType (); if (String.class.isAssignableFrom(propertyType)) editor = new org.netbeans.modules.visualweb.propertyeditors.StringPropertyEditor(); else if (Integer.class.isAssignableFrom(propertyType)) editor = new org.netbeans.modules.visualweb.propertyeditors.IntegerPropertyEditor(); else if (Long.class.isAssignableFrom(propertyType)) editor = new org.netbeans.modules.visualweb.propertyeditors.LongPropertyEditor(); else if (Double.class.isAssignableFrom(propertyType)) editor = new org.netbeans.modules.visualweb.propertyeditors.DoublePropertyEditor(); else if (Converter.class.isAssignableFrom(propertyType)) editor = new org.netbeans.modules.visualweb.propertyeditors.ConverterPropertyEditor(); else if (Validator.class.isAssignableFrom(propertyType)) editor = new org.netbeans.modules.visualweb.propertyeditors.ValidatorPropertyEditor(); else if (ValueBinding.class.isAssignableFrom(propertyType)) editor = new org.netbeans.modules.visualweb.propertyeditors.binding.ValueBindingPropertyEdit or(); else if (MethodBinding.class.isAssignableFrom(propertyType)) editor = new org.netbeans.modules.visualweb.propertyeditors.MethodBindingPropertyEditor(); // If no editor loaded still, attempt to load the editor registered statically // with the Java Beans editor manager if (editor == null) { editor = PropertyEditorManager.findEditor (descriptor.getPropertyType()); // An ultimate fallback editor is one that allows sibling bean selection if (editor == null) editor = new BeanSelectionEditor(this); } }