Bug 149251 Inconsistent Handling of a Non-inheritable ROM Property
For a ROM property defined to be non-inheritable, an empty string property value should be consistently handled as an empty string, not as null. For example, an oda.dataSource extension defines a data source property with canInherit=false. When a oda-data-source handle get saved in a report design, it correctly includes the tag for such property, even when an empty string value is specified. <oda-data-source extensionID="my.oda.plugin" name="my Data Source" id="24"> ... <property name="ApplicationServer"></property> </oda-data-source> However, later when using the DE API to read its property value, a null is returned. Then when the report design is subsequently saved, the property tag is lost. Expects that an empty string value of a non-inhertiable property should be preserved.
model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/elements/strategy/CellPropSearchStrategy.java
if ( columnSlot.getCount( ) == 0 )
			return null;
		int columnNum = grid.getCellPositionInColumn( module, target );
		assert columnNum > 0;
		TableColumn column = ColumnHelper.findColumn( module, columnSlot,
				columnNum );
		if ( column != null )
			return getPropertyFromElement( module, column, prop );
		return null;
	}
	/**
	 * Tests if the property of a cell is inheritable in the context.
	 * <p>
	 * If the cell resides in the row and the property is "vertical-align",
	 * return <code>true</code>. Otherwise, return the value from its super
	 * class.
	 * 
	 * @see org.eclipse.birt.report.model.core.DesignElement#isInheritableProperty(org.eclipse.birt.report.model.metadata.ElementPropertyDefn)
	 */
	protected boolean isInheritableProperty( DesignElement element,
			ElementPropertyDefn prop )
	{
		assert prop != null;
		if ( Style.VERTICAL_ALIGN_PROP.equalsIgnoreCase( prop.getName( ) )
				&& element.getContainer( ) instanceof TableRow )
			return true;
		return super.isInheritableProperty( element, prop );
	}
}