Bug 213680 [2.2.2]Chart script can not be cleaned completely.
Description: Reset script or delete all script does not work. build version: v20071221-0630 steps to reproduce: 1. New a report. 2. New a chart. 3. Enter some script for the chart and save the report. 4. Click the reset scirpt button or delete all script. 5. Save the report and switch to layout,then switch back to script page. Expected result: Script are cleaned. Actual result: Script are not cleaned. Note: If you delete part of the script, it works.
model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/writer/ModuleWriter.java
{
		resourceKey( obj, resourceKey, resourceValue, false );
	}
	/**
	 * Writes the resource key.
	 * 
	 * @param obj
	 *            the design element
	 * @param resourceKey
	 *            the property name of resource key
	 * @param resourceName
	 *            the property name of user-visible resource
	 * @param cdata
	 *            whether the values is written as CDATA
	 */
	protected void resourceKey( DesignElement obj, String resourceKey,
			String resourceName, boolean cdata )
	{
		PropertyDefn nameProp = (ElementPropertyDefn) obj.getDefn( )
				.getProperty( resourceName );
		assert nameProp != null;
		Object value = obj.getLocalProperty( getModule( ), nameProp.getName( ) );
		String xml = nameProp.getXmlValue( getModule( ), value );
		PropertyDefn keyProp = (ElementPropertyDefn) obj.getDefn( )
				.getProperty( resourceKey );
		assert keyProp != null;
		value = obj.getLocalProperty( getModule( ), keyProp.getName( ) );
		String xmlKey = keyProp.getXmlValue( getModule( ), value );
		if ( xmlKey == null && xml == null )
			return;