Bug 159033 Adding Datasource Property Bindings with 10,000+ ids causes incorrect XML creation.
I have a large report that has programatically generated more than 10,000 ids for my report components. Now, I go to edit the property bindings for the data source for my report, so that I can specify parameter-defined database connection properties. When I look at the XML, I find that the <list-property name="propertyBindings"> section was incorrectly created by the report designer. (See below for sample). <list-property name="propertyBindings"> <structure> <property name="name">odaDriverClass</property> <property name="id">13,218</property> </structure> <structure> <property name="name">odaURL</property> <property name="id">13,218</property> <expression name="value">params["DBConnectionString"]</expression> </structure> <structure> <property name="name">odaUser</property> <property name="id">13,218</property> <expression name="value">params["DBPassword"]</expression> </structure> <structure> <property name="name">odaPassword</property> <property name="id">13,218</property> </structure> <structure> <property name="name">odaJndiName</property> <property name="id">13,218</property> </structure> </list-property> Once I look at the XML once, I can never go back to Layout/Preview/... tabs. I recieve the error "Error in XML Source Page must be corrected before other pages can be used." The issue is that the line(s): <property name="id">13,218</property> are causing the XML parser to break. I can manually fixing this by removing the comma in the id variable, so the line(s) should look like: <property name="id">13218</property> So far, this only seems to be occuring on IDs generated for data source property bindings. The real issue with this is that, I never realized there was an error until I viewed the "XML Source" tab. And after I looked at it once, I was not able to return to any other tabs thereafter. Sheldon Warkentin 3esi
model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/metadata/NumberPropertyType.java
* <li>A Double or Float object. The object must be within the range of a
	 * BigDecimal.</li>
	 * <li>A string that parses to a number. The decimal separator is locale
	 * specific.</li>
	 * </ul>
	 * <p>
	 * A number is represented internally by a <code>BigDecimal</code> object
	 * 
	 * @return object of type <code>BigDecimal</code> or null.
	 */
	public Object validateValue( Module module, PropertyDefn defn, Object value )
			throws PropertyValueException
	{
		if ( value == null )
			return null;
		if ( value instanceof BigDecimal )
			return value;
		if ( value instanceof Double )
			return new BigDecimal( ( (Double) value ).doubleValue( ) );
		if ( value instanceof Integer )
			return new BigDecimal( ( (Integer) value ).intValue( ) );
		if ( value instanceof String )
			return validateInputString( module, defn, (String) value );
		throw new PropertyValueException( value,
				PropertyValueException.DESIGN_EXCEPTION_INVALID_VALUE,
				NUMBER_TYPE );
	}
	/**
	 * Validates the xml representation of this number property value. The xml
	 * value will be translated into a BigDecimal object.