diff options
author | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2009-11-05 14:33:55 +0100 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2009-11-05 14:33:55 +0100 |
commit | a7b054e6309a841df1c67696258af8ad19cebdea (patch) | |
tree | 383811d31673b47585924856a8f26ef7545e01bd /forms/qa/integration | |
parent | 6ad1eebbe252c983a3f915912cd119e36af0bfed (diff) |
new test case catching issue #i105235# (note that the fix for this issue is not yet in here, so until we rebase to a milestone where CWS dba32h resp. dba32j are integrated, the test will fail)
Diffstat (limited to 'forms/qa/integration')
-rw-r--r-- | forms/qa/integration/forms/FormLayer.java | 20 | ||||
-rw-r--r-- | forms/qa/integration/forms/MasterDetailForms.java | 334 |
2 files changed, 273 insertions, 81 deletions
diff --git a/forms/qa/integration/forms/FormLayer.java b/forms/qa/integration/forms/FormLayer.java index d67e28bcf412..21767b254ae0 100644 --- a/forms/qa/integration/forms/FormLayer.java +++ b/forms/qa/integration/forms/FormLayer.java @@ -42,6 +42,7 @@ import com.sun.star.drawing.XControlShape; import com.sun.star.drawing.XShapes; import com.sun.star.awt.Size; import com.sun.star.awt.Point; +import com.sun.star.awt.VisualEffect; import com.sun.star.awt.XControlModel; import com.sun.star.text.TextContentAnchorType; import com.sun.star.drawing.XDrawPage; @@ -95,7 +96,7 @@ public class FormLayer the property access to the control's model */ public XPropertySet createControlAndShape( String sFormComponentService, int nXPos, - int nYPos, int nWidth, int nHeight, XIndexContainer xParentForm ) throws java.lang.Exception + int nYPos, int nWidth, int nHeight, Object _parentForm ) throws java.lang.Exception { // let the document create a shape XMultiServiceFactory xDocAsFactory = (XMultiServiceFactory)UnoRuntime.queryInterface( @@ -118,9 +119,14 @@ public class FormLayer m_document.getOrb().createInstance( sQualifiedComponentName ) ); // insert the model into the form component hierarchy, if the caller gave us a location - if ( null != xParentForm ) + if ( null != _parentForm ) { - xParentForm.insertByIndex( xParentForm.getCount(), xModel ); + XIndexContainer parentForm = null; + if ( _parentForm instanceof XIndexContainer ) + parentForm = (XIndexContainer)_parentForm; + else + parentForm = (XIndexContainer)UnoRuntime.queryInterface( XIndexContainer.class, _parentForm ); + parentForm.insertByIndex( parentForm.getCount(), xModel ); } // knitt them @@ -231,6 +237,12 @@ public class FormLayer // insert the text field control XPropertySet xFieldModel = createControlAndShape( sControlType, nXPos + 26, nYPos, 40, nHeight ); xFieldModel.setPropertyValue( "DataField", sFieldName ); + if ( xFieldModel.getPropertySetInfo().hasPropertyByName( "Border" ) ) + { + xFieldModel.setPropertyValue( "Border", new Short( VisualEffect.FLAT ) ); + if ( xFieldModel.getPropertySetInfo().hasPropertyByName( "BorderColor" ) ) + xFieldModel.setPropertyValue( "BorderColor", new Integer( 0x00C0C0C0 ) ); + } // knit it to it's label component xFieldModel.setPropertyValue( "LabelControl", xLabelModel ); @@ -256,7 +268,7 @@ public class FormLayer public XPropertySet insertControlLine( String sControlType, String sFieldName, String sControlNamePostfix, int nYPos ) throws java.lang.Exception { - return insertControlLine( sControlType, sFieldName, sControlNamePostfix, 2, nYPos, 6 ); + return insertControlLine( sControlType, sFieldName, sControlNamePostfix, 10, nYPos, 6 ); } /* ------------------------------------------------------------------ */ diff --git a/forms/qa/integration/forms/MasterDetailForms.java b/forms/qa/integration/forms/MasterDetailForms.java index 2b83a11dd223..ffebe93ee559 100644 --- a/forms/qa/integration/forms/MasterDetailForms.java +++ b/forms/qa/integration/forms/MasterDetailForms.java @@ -30,67 +30,77 @@ package integration.forms; +import com.sun.star.beans.NamedValue; +import com.sun.star.beans.XPropertySet; +import com.sun.star.container.XIndexContainer; import java.lang.reflect.Method; import com.sun.star.uno.UnoRuntime; import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.beans.*; import com.sun.star.container.XNameContainer; +import com.sun.star.embed.XComponentSupplier; +import com.sun.star.form.XGridColumnFactory; +import com.sun.star.form.XGridFieldDataSupplier; import com.sun.star.form.XLoadable; -import com.sun.star.sdbc.*; - -import connectivity.tools.*; +import com.sun.star.lang.XComponent; +import com.sun.star.sdb.CommandType; +import com.sun.star.sdb.XFormDocumentsSupplier; +import com.sun.star.sdbc.SQLException; +import com.sun.star.sdbc.XColumnLocate; +import com.sun.star.ucb.Command; +import com.sun.star.ucb.OpenMode; +import com.sun.star.ucb.XCommandProcessor; +import com.sun.star.uno.Type; +import com.sun.star.util.XModifiable; +import connectivity.tools.CRMDatabase; +import connectivity.tools.HsqlColumnDescriptor; +import connectivity.tools.HsqlDatabase; +import connectivity.tools.HsqlTableDescriptor; +import org.openoffice.complex.forms.tools.ResultSet; public class MasterDetailForms extends complexlib.ComplexTestCase implements com.sun.star.form.XLoadListener { private XMultiServiceFactory m_orb; - private HsqlDatabase m_databaseDocument; private XPropertySet m_masterForm; private XPropertySet m_detailForm; - private XResultSet m_masterSet; - private XResultSet m_detailSet; - private XRow m_masterRow; - private XRow m_detailRow; + private ResultSet m_masterResult; + private ResultSet m_detailResult; - private Object m_waitForLoad; - private boolean m_loaded; + final private Object m_waitForLoad = new Object(); + private boolean m_loaded = false; - /** Creates a new instance of ValueBinding */ + /** Creates a new instance of MasterDetailForms */ public MasterDetailForms() { - m_loaded = false; - m_waitForLoad = new Object(); } /* ------------------------------------------------------------------ */ public String[] getTestMethodNames() { return new String[] { - "checkMultipleKeys" + "checkMultipleKeys", + "checkDetailFormDefaults" }; } /* ------------------------------------------------------------------ */ - public String getTestObjectName() + public void before() { - return "Form Control Spreadsheet Cell Binding Test"; + m_orb = (XMultiServiceFactory)param.getMSF(); } /* ------------------------------------------------------------------ */ - public void before() throws java.lang.Exception + public String getTestObjectName() { - m_orb = (XMultiServiceFactory)param.getMSF(); - m_databaseDocument = new HsqlDatabase( m_orb ); - createTableStructure(); - createForms(); + return "Form Control Spreadsheet Cell Binding Test"; } /* ------------------------------------------------------------------ */ /** creates the table structure needed for the test */ - private void createTableStructure() throws SQLException + private void impl_createTableStructure( final HsqlDatabase _databaseDocument ) throws SQLException { HsqlColumnDescriptor[] masterColumns = { new HsqlColumnDescriptor( "ID1", "INTEGER", HsqlColumnDescriptor.PRIMARY ), @@ -103,94 +113,257 @@ public class MasterDetailForms extends complexlib.ComplexTestCase implements com new HsqlColumnDescriptor( "FK_ID2", "INTEGER", HsqlColumnDescriptor.REQUIRED, "master", "ID2" ), new HsqlColumnDescriptor( "name", "VARCHAR(50)" ), }; - m_databaseDocument.createTable( new HsqlTableDescriptor( "master", masterColumns ) ); - m_databaseDocument.createTable( new HsqlTableDescriptor( "detail", detailColumns ) ); + _databaseDocument.createTable( new HsqlTableDescriptor( "master", masterColumns ) ); + _databaseDocument.createTable( new HsqlTableDescriptor( "detail", detailColumns ) ); - m_databaseDocument.executeSQL( "INSERT INTO \"master\" VALUES ( 1, 1, 'First Record' )" ); - m_databaseDocument.executeSQL( "INSERT INTO \"master\" VALUES ( 1, 2, 'Second Record' )" ); - m_databaseDocument.executeSQL( "INSERT INTO \"detail\" VALUES ( 1, 1, 1, 'record 1.1 (1)')"); - m_databaseDocument.executeSQL( "INSERT INTO \"detail\" VALUES ( 2, 1, 1, 'record 1.1 (2)')"); - m_databaseDocument.executeSQL( "INSERT INTO \"detail\" VALUES ( 3, 1, 2, 'record 1.2 (1)')"); + _databaseDocument.executeSQL( "INSERT INTO \"master\" VALUES ( 1, 1, 'First Record' )" ); + _databaseDocument.executeSQL( "INSERT INTO \"master\" VALUES ( 1, 2, 'Second Record' )" ); + _databaseDocument.executeSQL( "INSERT INTO \"detail\" VALUES ( 1, 1, 1, 'record 1.1 (1)')"); + _databaseDocument.executeSQL( "INSERT INTO \"detail\" VALUES ( 2, 1, 1, 'record 1.1 (2)')"); + _databaseDocument.executeSQL( "INSERT INTO \"detail\" VALUES ( 3, 1, 2, 'record 1.2 (1)')"); - m_databaseDocument.getDataSource().refreshTables( m_databaseDocument.defaultConnection() ); + _databaseDocument.getDataSource().refreshTables( _databaseDocument.defaultConnection() ); } /* ------------------------------------------------------------------ */ - public void createForms() throws com.sun.star.uno.Exception + private void impl_createForms( final HsqlDatabase _databaseDocument ) throws com.sun.star.uno.Exception { m_masterForm = dbfTools.queryPropertySet( m_orb.createInstance( "com.sun.star.form.component.DataForm" ) ); - m_masterRow = (XRow)UnoRuntime.queryInterface( XRow.class, m_masterForm ); - m_masterSet = (XResultSet)UnoRuntime.queryInterface( XResultSet.class, m_masterForm ); - m_masterForm.setPropertyValue( "ActiveConnection", m_databaseDocument.defaultConnection() ); + m_masterForm.setPropertyValue( "ActiveConnection", _databaseDocument.defaultConnection() ); m_masterForm.setPropertyValue( "CommandType", new Integer( com.sun.star.sdb.CommandType.TABLE ) ); m_masterForm.setPropertyValue( "Command", "master" ); + m_masterResult = new ResultSet( m_masterForm ); + m_detailForm = dbfTools.queryPropertySet( m_orb.createInstance( "com.sun.star.form.component.DataForm" ) ); - m_detailRow = (XRow)UnoRuntime.queryInterface( XRow.class, m_detailForm ); - m_detailSet = (XResultSet)UnoRuntime.queryInterface( XResultSet.class, m_detailForm ); - m_detailForm.setPropertyValue( "ActiveConnection", m_databaseDocument.defaultConnection() ); + m_detailForm.setPropertyValue( "ActiveConnection", _databaseDocument.defaultConnection() ); m_detailForm.setPropertyValue( "CommandType", new Integer( com.sun.star.sdb.CommandType.TABLE ) ); m_detailForm.setPropertyValue( "Command", "detail" ); + m_detailResult = new ResultSet( m_detailForm ); + XNameContainer masterContainer = (XNameContainer)UnoRuntime.queryInterface( XNameContainer.class, m_masterForm ); masterContainer.insertByName( "slave", m_detailForm ); } /* ------------------------------------------------------------------ */ - public void after() throws com.sun.star.uno.Exception, java.lang.Exception - { - m_databaseDocument.closeAndDelete(); - dbfTools.disposeComponent( m_masterForm ); - dbfTools.disposeComponent( m_detailForm ); - } - - /* ------------------------------------------------------------------ */ /** checks if master-detail relationships including multiple keys work */ public void checkMultipleKeys() throws com.sun.star.uno.Exception, java.lang.Exception { - m_detailForm.setPropertyValue( "MasterFields", new String[] { "ID1", "ID2" } ); - m_detailForm.setPropertyValue( "DetailFields", new String[] { "FK_ID1", "FK_ID2" } ); + HsqlDatabase databaseDocument = null; + try + { + databaseDocument = new HsqlDatabase( m_orb ); + impl_createTableStructure( databaseDocument ); + impl_createForms( databaseDocument ); + + m_detailForm.setPropertyValue( "MasterFields", new String[] { "ID1", "ID2" } ); + m_detailForm.setPropertyValue( "DetailFields", new String[] { "FK_ID1", "FK_ID2" } ); - XLoadable loadMaster = (XLoadable)UnoRuntime.queryInterface( XLoadable.class, m_masterForm ); - XLoadable loadDetail = (XLoadable)UnoRuntime.queryInterface( XLoadable.class, m_detailForm ); - loadDetail.addLoadListener( this ); + XLoadable loadMaster = (XLoadable)UnoRuntime.queryInterface( XLoadable.class, m_masterForm ); + XLoadable loadDetail = (XLoadable)UnoRuntime.queryInterface( XLoadable.class, m_detailForm ); + loadDetail.addLoadListener( this ); - // wait until the detail form is loaded - operateMasterAndWaitForDetailForm( loadMaster.getClass().getMethod( "load", new Class[] {} ), loadMaster, new Object[] { } ); + // wait until the detail form is loaded + operateMasterAndWaitForDetailForm( loadMaster.getClass().getMethod( "load", new Class[] {} ), loadMaster, new Object[] { } ); - // okay, now the master form should be on the first record - assure( "wrong form state after loading (ID1)", m_masterRow.getInt(1) == 1 ); - assure( "wrong form state after loading (ID2)", m_masterRow.getInt(2) == 1 ); - assure( "wrong form state after loading (value)", m_masterRow.getString(3).equals( "First Record" ) ); + // okay, now the master form should be on the first record + assure( "wrong form state after loading (ID1)", m_masterResult.getInt(1) == 1 ); + assure( "wrong form state after loading (ID2)", m_masterResult.getInt(2) == 1 ); + assure( "wrong form state after loading (value)", m_masterResult.getString(3).equals( "First Record" ) ); - // the "XResultSet.next" method - Method methodNext = m_masterSet.getClass().getMethod( "next" , new Class[] {} ); + // the "XResultSet.next" method + Method methodNext = m_masterResult.getClass().getMethod( "next" , new Class[] {} ); + + // the values in the linked fields should be identical + int expectedDetailRowCounts[] = { 2, 1 }; + do + { + verifyColumnValueIdentity( "ID1", "FK_ID1" ); + verifyColumnValueIdentity( "ID2", "FK_ID2" ); + + m_detailResult.last(); + int masterPos = m_masterResult.getRow(); + assure( "wrong number of records in detail form, for master form at pos " + masterPos, + ((Integer)m_detailForm.getPropertyValue( "RowCount" )).intValue() == expectedDetailRowCounts[ masterPos - 1 ] ); + + operateMasterAndWaitForDetailForm( methodNext, m_masterResult, new Object[] {} ); + } + while ( !m_masterResult.isAfterLast() ); + assure( "wrong number of records in master form", 2 == ((Integer)m_masterForm.getPropertyValue( "RowCount" )).intValue() ); + } + finally + { + if ( databaseDocument != null ) + databaseDocument.closeAndDelete(); + impl_cleanUpStep(); + } + } + + /* ------------------------------------------------------------------ */ + private final void impl_cleanUpStep() + { + if ( m_masterForm != null ) + dbfTools.disposeComponent( m_masterForm ); + if ( m_detailForm != null ) + dbfTools.disposeComponent( m_detailForm ); + m_masterForm = m_detailForm = null; + } - // the values in the linked fields should be identical - int expectedDetailRowCounts[] = { 2, 1 }; - do + /* ------------------------------------------------------------------ */ + /** checks whether default values in detail forms work as expected. + * + * Effectively, this test case verifies the issues #i106574# and #i105235# did not creep back in. + */ + public void checkDetailFormDefaults() throws Exception + { + CRMDatabase database = null; + XCommandProcessor subComponentCommands = null; + try + { + // create our standard CRM database document + database = new CRMDatabase( m_orb, true ); + + // create a form document therein + XFormDocumentsSupplier formDocSupp = (XFormDocumentsSupplier)UnoRuntime.queryInterface( + XFormDocumentsSupplier.class, database.getDatabase().getModel() ); + XMultiServiceFactory formFactory = (XMultiServiceFactory)UnoRuntime.queryInterface( + XMultiServiceFactory.class, formDocSupp.getFormDocuments() ); + NamedValue[] loadArgs = new NamedValue[] { + new NamedValue( "ActiveConnection", database.getConnection() ), + new NamedValue( "MediaType", "application/vnd.oasis.opendocument.text" ) + }; + + subComponentCommands = (XCommandProcessor)UnoRuntime.queryInterface( + XCommandProcessor.class, + formFactory.createInstanceWithArguments( "com.sun.star.sdb.DocumentDefinition", loadArgs ) ); + Command command = new Command(); + command.Name = "openDesign"; + command.Argument = new Short( OpenMode.DOCUMENT ); + + DocumentHelper subDocument = new DocumentHelper( m_orb, + (XComponent)UnoRuntime.queryInterface( XComponent.class, + subComponentCommands.execute( command, subComponentCommands.createCommandIdentifier(), null ) + ) + ); + FormLayer formLayer = new FormLayer( subDocument ); + XPropertySet controlModel = formLayer.insertControlLine( "DatabaseNumericField", "ID", "", 10 ); + formLayer.insertControlLine( "DatabaseTextField", "Name", "", 20 ); + formLayer.insertControlLine( "DatabaseTextField", "Description", "", 30 ); + + m_masterForm = (XPropertySet)dbfTools.getParent( controlModel, XPropertySet.class ); + m_masterForm.setPropertyValue( "Command", "categories" ); + m_masterForm.setPropertyValue( "CommandType", new Integer( CommandType.TABLE ) ); + + // create a detail form + m_detailForm = (XPropertySet)UnoRuntime.queryInterface( + XPropertySet.class, subDocument.createSubForm( m_masterForm, "products" ) ); + m_detailForm.setPropertyValue( "Command", "SELECT \"ID\", \"Name\", \"CategoryID\" FROM \"products\"" ); + m_detailForm.setPropertyValue( "CommandType", new Integer( CommandType.COMMAND ) ); + m_detailForm.setPropertyValue( "MasterFields", new String[] { "ID" } ); + m_detailForm.setPropertyValue( "DetailFields", new String[] { "CategoryID" } ); + + // create a grid control in the detail form, with some columns + XPropertySet gridControlModel = formLayer.createControlAndShape( "GridControl", 20, 40, 130, 50, m_detailForm ); + gridControlModel.setPropertyValue( "Name", "product list" ); + XIndexContainer gridColumns = (XIndexContainer)UnoRuntime.queryInterface( + XIndexContainer.class, gridControlModel ); + impl_createGridColumn( gridColumns, "TextField", "ID" ); + XPropertySet nameColumn = impl_createGridColumn( gridColumns, "TextField", "Name" ); + nameColumn.setPropertyValue( "Width", new Integer( 600 ) ); // 6 cm + nameColumn.setPropertyValue( "DefaultText", "default text" ); + + // go live + m_masterResult = new ResultSet( m_masterForm ); + m_detailResult = new ResultSet( m_detailForm ); + + XLoadable loadDetail = (XLoadable)UnoRuntime.queryInterface( XLoadable.class, m_detailForm ); + loadDetail.addLoadListener( this ); + + subDocument.getCurrentView().toggleFormDesignMode(); + impl_waitForLoadedEvent(); + + // now that we set up this, do the actual tests + // First, http://www.openoffice.org/issues/show_bug.cgi?id=105235 described the problem + // that default values in the sub form didn't work when the master form was navigated to a row + // for which no detail records were present, and the default of the column/control is the same + // as the last known value. + + // so, take the current value of the "Name" column, and set it as default value ... + String defaultValue = m_detailResult.getString( 2 ); + nameColumn.setPropertyValue( "DefaultText", defaultValue ); + // ... then move to the second main form row ... + m_masterResult.absolute( 2 ); + impl_waitForLoadedEvent(); + // ... which should result in an empty sub form ... + assure( "test precondition not met: The second master form record is expected to have no detail records, " + + "else the test becomes meaningless", impl_isNewRecord( m_detailForm ) ); + // ... and in the "Name" column having the proper text + String actualValue = (String)nameColumn.getPropertyValue( "Text" ); + assureEquals( "#i105235#: default value in sub form not working (not propagated to column model)", defaultValue, actualValue ); + // However, checking the column model's value alone is not enough - we need to ensure it is properly + // propagated to the control. + XGridFieldDataSupplier gridData = (XGridFieldDataSupplier)subDocument.getCurrentView().getControl( + gridControlModel, XGridFieldDataSupplier.class ); + actualValue = (String)(gridData.queryFieldData( 0, Type.STRING )[1]); + assureEquals( "#i105235#: default value in sub form not working (not propagated to column)", defaultValue, actualValue ); + } + finally { - verifyColumnValueIdentity( "ID1", "FK_ID1" ); - verifyColumnValueIdentity( "ID2", "FK_ID2" ); + if ( subComponentCommands != null ) + { + XComponentSupplier componentSupplier = (XComponentSupplier)UnoRuntime.queryInterface( XComponentSupplier.class, + subComponentCommands ); + XModifiable modifySubComponent = (XModifiable)UnoRuntime.queryInterface( XModifiable.class, + componentSupplier.getComponent() ); + modifySubComponent.setModified( false ); + Command command = new Command(); + command.Name = "close"; + subComponentCommands.execute( command, subComponentCommands.createCommandIdentifier(), null ); + } - m_detailSet.last(); - int masterPos = m_masterSet.getRow(); - assure( "wrong number of records in detail form, for master form at pos " + masterPos, - ((Integer)m_detailForm.getPropertyValue( "RowCount" )).intValue() == expectedDetailRowCounts[ masterPos - 1 ] ); + if ( database != null ) + database.saveAndClose(); - operateMasterAndWaitForDetailForm( methodNext, m_masterSet, new Object[] {} ); + impl_cleanUpStep(); } - while ( !m_masterSet.isAfterLast() ); - assure( "wrong number of records in master form", 2 == ((Integer)m_masterForm.getPropertyValue( "RowCount" )).intValue() ); } + /* ------------------------------------------------------------------ */ + private boolean impl_isNewRecord( final XPropertySet _rowSet ) + { + boolean isNew = false; + try + { + isNew = ((Boolean)_rowSet.getPropertyValue( "IsNew" )).booleanValue(); + } + catch ( Exception ex ) + { + failed( "obtaining the IsNew property failed" ); + } + return isNew; + } + + /* ------------------------------------------------------------------ */ + private XPropertySet impl_createGridColumn( final XIndexContainer _gridModel, final String _columnType, final String _boundField ) throws Exception + { + final XGridColumnFactory columnFactory = (XGridColumnFactory)UnoRuntime.queryInterface( + XGridColumnFactory.class, _gridModel ); + XPropertySet column = columnFactory.createColumn( _columnType ); + column.setPropertyValue( "DataField", _boundField ); + column.setPropertyValue( "Name", _boundField ); + column.setPropertyValue( "Label", _boundField ); + _gridModel.insertByIndex( _gridModel.getCount(), column ); + return column; + } + + /* ------------------------------------------------------------------ */ /** executes an operation on the master, and waits until the detail form has been (re)loaded aferwards */ private void operateMasterAndWaitForDetailForm( Method _masterMethod, Object _masterInterface, Object[] _methodParameters ) throws SQLException { - m_loaded = false; Object result; try { @@ -205,28 +378,35 @@ public class MasterDetailForms extends complexlib.ComplexTestCase implements com if ( !((Boolean)result).booleanValue() ) return; + impl_waitForLoadedEvent(); + } + + private void impl_waitForLoadedEvent() + { synchronized( m_waitForLoad ) { - if ( !m_loaded ) + while ( !m_loaded ) { try { m_waitForLoad.wait(); } catch( java.lang.InterruptedException e ) { } } + // reset the flag for the next time + m_loaded = false; } } /** assures that the (integer) values in the given columns of our master and detail forms are identical */ - public void verifyColumnValueIdentity( String masterColName, String detailColName ) throws SQLException + private void verifyColumnValueIdentity( final String masterColName, final String detailColName ) throws SQLException { XColumnLocate locateMasterCols = (XColumnLocate)UnoRuntime.queryInterface( XColumnLocate.class, m_masterForm ); XColumnLocate locateDetailCols = (XColumnLocate)UnoRuntime.queryInterface( XColumnLocate.class, m_detailForm ); - int masterValue = m_masterRow.getInt( locateMasterCols.findColumn( masterColName ) ); - int detailValue = m_detailRow.getInt( locateDetailCols.findColumn( detailColName ) ); + int masterValue = m_masterResult.getInt( locateMasterCols.findColumn( masterColName ) ); + int detailValue = m_detailResult.getInt( locateDetailCols.findColumn( detailColName ) ); assure( "values in linked column pair " + detailColName + "->" + masterColName + " (" + - detailValue + "->" + masterValue + ") do not match (master position: " + m_masterSet.getRow() + ")!", + detailValue + "->" + masterValue + ") do not match (master position: " + m_masterResult.getRow() + ")!", masterValue == detailValue ); } |