Bug 201038 The joint dataset from library can not be used and exception occurs when preview in dataset[07]
Description: The joint dataset from library can not be used and exception occurs when preview in dataset[07] Build number: 2.2.1.v20070824-0630 Steps to reproduce: 1, New a library and create two datasets ds1 and ds2 2, Creata a joint dataset ds3 using ds1 and ds2 3, Publish the library 4, New a report and using the Joint dataset and preview in joint dataset Expected result: The preview should be successful Actual result: Exception occurs Error log: java.lang.ClassCastException: org.eclipse.birt.report.model.metadata.ElementRefValue at org.eclipse.birt.report.model.command.AbstractPropertyCommand.setupStructureContext(AbstractPropertyCommand.java:534) at org.eclipse.birt.report.model.command.AbstractPropertyCommand.makeLocalCompositeValue(AbstractPropertyCommand.java:440) at org.eclipse.birt.report.model.command.ComplexPropertyCommand.doRemoveItem(ComplexPropertyCommand.java:456) at org.eclipse.birt.report.model.command.ComplexPropertyCommand.removeItem(ComplexPropertyCommand.java:393) at org.eclipse.birt.report.model.api.PropertyHandle.removeItem(PropertyHandle.java:317) at org.eclipse.birt.report.model.api.SimpleValueHandle.removeItem(SimpleValueHandle.java:453) at org.eclipse.birt.report.model.api.JointDataSetHandle.removeDataSet(JointDataSetHandle.java:128) at org.eclipse.birt.report.designer.data.ui.dataset.JointDataSetPage.modifyJointCondition(JointDataSetPage.java:989) at org.eclipse.birt.report.designer.data.ui.dataset.JointDataSetPage.canLeave(JointDataSetPage.java:963) at org.eclipse.birt.report.designer.data.ui.property.AbstractPropertyDialog.showPage(AbstractPropertyDialog.java:554) at org.eclipse.birt.report.designer.data.ui.property.AbstractPropertyDialog.showSelectionPage(AbstractPropertyDialog.java:467) at org.eclipse.birt.report.designer.data.ui.dataset.DataSetEditor.showSelectionPage(DataSetEditor.java:820) at org.eclipse.birt.report.designer.data.ui.property.AbstractPropertyDialog$3.run(AbstractPropertyDialog.java:425)
model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/command/AbstractPropertyCommand.java
continue;
			IReferencableElement client = (IReferencableElement) ( (ElementRefValue) refValue )
					.getElement( );
			BackRefRecord record = new ElementBackRefRecord( module, client,
					referred, memberDefn.getName( ) );
			getActivityStack( ).execute( record );
		}
	}
	/**
	 * The top level element property referenced by a member reference can be a
	 * list property or a structure property.
	 * <p>
	 * <li>If references a list property, the method will check to see if the
	 * current element has the local list value, if it has, the method returns,
	 * otherwise, a copy of the list value inherited from container or parent
	 * will be set locally on the element itself.
	 * <li>If references a structure property, the method will check to see if
	 * the current element has the local structure value, if it has, the method
	 * returns, otherwise, a copy of the structure value inherited from
	 * container or parent will be set locally on the element itself.
	 * <p>
	 * This method is supposed to be used when we need to change the value of a
	 * composite property( a list property or a structure property ). These kind
	 * of property is inherited as a whole, so when the value changed from a
	 * child element. This method will be called to ensure that a local copy
	 * will be made, so change to the child won't affect the original value in
	 * the parent.
	 * 
	 * @param ref
	 *            a reference to a list property or member.