public void scanTableItems ( ) { m_vDisplays = new Vector < String > ( ) ; m_vValues = new Vector < String > ( ) ; String strField = null ; Convert converter = this . getScreenField ( ) . getConverter ( ) ; Object data = converter . getData ( ) ; BaseField field = ( BaseField ) converter . getField ( ) ; boolean bModifiedState = false ; boolean [ ] states = null ; if ( field != null ) { bModifiedState = field . isModified ( ) ; states = field . setEnableListeners ( false ) ; } for ( int index = 0 ; index < SPopupBox . MAX_POPUP_ITEMS ; index ++ ) { String strDisplay = converter . convertIndexToDisStr ( index ) ; boolean bModified = false ; if ( field != null ) bModified = field . isModified ( ) ; converter . convertIndexToField ( index , DBConstants . DONT_DISPLAY , DBConstants . READ_MOVE ) ; // Don't change if ( field != null ) field . setModified ( bModified ) ; if ( converter . getField ( ) != null ) strField = converter . getField ( ) . getString ( ) ; else strField = Integer . toString ( index ) ; if ( index > 0 ) if ( ( strDisplay == null ) || ( strDisplay . length ( ) == 0 ) ) break ; // Far Enough m_vDisplays . add ( strDisplay ) ; m_vValues . add ( strField ) ; } converter . setData ( data , DBConstants . DONT_DISPLAY , DBConstants . READ_MOVE ) ; // Restore to original value if ( field != null ) { field . setModified ( bModifiedState ) ; field . setEnableListeners ( states ) ; } }
Scan through the items and cache the values and display strings .