m_document.getFormComponentTreeRoot() );
final XNameAccess form = UnoRuntime.queryInterface( XNameAccess.class, formsCollection.getByIndex(0) );
final DocumentViewHelper view = m_document.getCurrentView();
final XFormController formController = view.getFormController( form );
final XFormOperations formOperations = formController.getFormOperations();
// move through all records, and check that the display values in the list boxes are as expected
final String[][] fieldTypesDefinitions = impl_getFieldTypeDefinitions();
final String[] fieldTypes = fieldTypesDefinitions[0];
final String[] displayValues = impl_getDisplayValues();
formOperations.execute( FormFeature.MoveToFirst );
for ( int row=0; row<2; ++row )
{
StringBuffer failedFieldTypes = new StringBuffer();
for ( int i=0; i<fieldTypes.length; ++i )
{
final String columnFKName = fieldTypes[i] + "_fk";
Object listBoxModel = form.getByName( columnFKName );
XListBox listBoxControl = UnoRuntime.queryInterface( XListBox.class,
view.getControl( listBoxModel ) );
if ( !listBoxControl.getSelectedItem().equals( displayValues[row] ) )
{
if ( failedFieldTypes.length() > 0 )
failedFieldTypes.append( ", " );
failedFieldTypes.append( fieldTypes[i] );
}
}
/*assure( "The following field types do not work when used as bound list box fields: " + failedFieldTypes.toString() +
" (row " + row + ")", failedFieldTypes.length() == 0 );*/
formOperations.execute( FormFeature.MoveToNext );
}
}
finally
{