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.
M8 1. Add a listbox or other selection components 2. Right click at listbox and select Configure default options 3. Check selected items and choose item 2 as selected -- Check Page1.java private void _init() throws Exception {checkboxGroup1DefaultOptions.setOptions(new com.sun.webui.jsf.model.Option[]{new com.sun.webui.jsf.model.Option("item1", "Item 1"), new com.sun.webui.jsf.model.Option("item2", "Item 2"), new com.sun.webui.jsf.model.Option("item3", "Item 3")}); checkboxGroup1DefaultOptions.setSelectedValue((ERROR) ? (ERROR) ? (ERROR) ? (ERROR) : (ERROR) : (ERROR) : (ERROR)); }
The generated code has compilation error. When remove these code and deploy the project, it shows nothing at browser. It happens on J2EE 4 and Java EE 5 project.
This bug occurs only in case of J2EE1.5 project. Upon debugging I found that OptionListCustomizer in case of J2EE1.5 project provides "???" to persist in java source which is incorrect According to Dongmei this bug cannot be fixed in M8 because they have to update woodstock components which is lots of changes. Therefore downgrading the bug to P2
Reset this to a P1. Did not assign it the to Stopper upbrella bug so it can be ignored for M8
Fixed checked in woodstock repository User: dcao Date: 2007-04-12 04:21:59+0000 Log: Fix for issue http://www.netbeans.org/issues/show_bug.cgi?id=98558: implemented public String getJavaInitializationString() File Changes: Directory: /woodstock/webui/src/designtime/com/sun/webui/jsf/component/propertyeditors/ ======================================================================================= File [changed]: SelectedValuesPropertyEditor.java Url: https://woodstock.dev.java.net/source/browse/woodstock/webui/src/designtime/com/sun/webui/jsf/component/propertyeditors/SelectedValuesPropertyEditor.java?r1=1.2&r2=1.3 Delta lines: +19 -0 -------------------- --- SelectedValuesPropertyEditor.java 2007-02-28 22:47:39+0000 1.2 +++ SelectedValuesPropertyEditor.java 2007-04-12 04:21:57+0000 1.3 @@ -25,6 +25,7 @@ import java.util.Arrays; import java.util.Collection; import java.util.Collections; +import com.sun.rave.propertyeditors.util.JavaInitializer; /** @@ -42,6 +43,24 @@ // Read-only } + public String getJavaInitializationString() { + StringBuffer buffer = new StringBuffer(); + Object value = this.getValue(); + if (value instanceof Object[]) { + buffer.append("new Object[] {"); + Object[] values = (Object[]) value; + for (int i = 0; i < values.length; i++) { + if (i > 0) + buffer.append(", "); + buffer.append(JavaInitializer.toJavaInitializationString(values[i])); + } + buffer.append("}"); + } else { + buffer.append(JavaInitializer.toJavaInitializationString(value)); + } + return buffer.toString(); + } + public String getAsText() { Object value = this.getValue(); if (value == null)
verified in netbeans M9 070430