public void addPropertyListeners ( ) { BaseField fldProperties = this . getField ( PropertiesRecord . PROPERTIES ) ; if ( fldProperties . getListener ( CopyConvertersHandler . class ) != null ) return ; this . addPropertiesFieldBehavior ( this . getField ( UserInfo . FRAMES ) , DBParams . FRAMES ) ; this . addPropertiesFieldBehavior ( this . getField ( UserInfo . JAVA ) , DBParams . JAVA ) ; this . addPropertiesFieldBehavior ( this . getField ( UserInfo . HOME ) , DBParams . HOME ) ; this . addPropertiesFieldBehavior ( this . getField ( UserInfo . MENU ) , DBParams . MENU ) ; this . addPropertiesFieldBehavior ( this . getField ( UserInfo . BANNERS ) , DBParams . BANNERS ) ; this . addPropertiesFieldBehavior ( this . getField ( UserInfo . TRAILERS ) , DBParams . TRAILERS ) ; this . addPropertiesFieldBehavior ( this . getField ( UserInfo . MENUBARS ) , DBParams . MENUBARS ) ; this . addPropertiesFieldBehavior ( this . getField ( UserInfo . LOGOS ) , DBParams . LOGOS ) ; this . addPropertiesFieldBehavior ( this . getField ( UserInfo . NAV_MENUS ) , DBParams . NAVMENUS ) ; this . addPropertiesFieldBehavior ( this . getField ( UserInfo . MENU_DESC ) , DBParams . MENUDESC ) ; this . addPropertiesFieldBehavior ( this . getField ( UserInfo . HELP_PAGE ) , MenuConstants . USER_HELP_DISPLAY ) ; this . addPropertiesFieldBehavior ( this . getField ( UserInfo . LANGUAGE ) , DBParams . LANGUAGE ) ; Record recContactType = ( ( ReferenceField ) this . getField ( UserInfo . CONTACT_TYPE_ID ) ) . getReferenceRecord ( ) ; this . getField ( UserInfo . CONTACT_TYPE_ID ) . addListener ( new ReadSecondaryHandler ( recContactType ) ) ; BaseField fldContactTypeCode = recContactType . getField ( ContactType . CODE ) ; CopyConvertersHandler listener = new CopyConvertersHandler ( new PropertiesConverter ( fldProperties , DBParams . CONTACT_TYPE ) , fldContactTypeCode ) ; this . getField ( UserInfo . CONTACT_TYPE_ID ) . addListener ( listener ) ; listener . setRespondsToMode ( DBConstants . INIT_MOVE , false ) ; listener . setRespondsToMode ( DBConstants . READ_MOVE , false ) ; this . addPropertiesFieldBehavior ( this . getField ( UserInfo . CONTACT_TYPE_ID ) , DBParams . CONTACT_TYPE + DBParams . ID ) ; this . addPropertiesFieldBehavior ( this . getField ( UserInfo . CONTACT_ID ) , DBParams . CONTACT_ID ) ; }
Add The listeners to sync the property field with the virtual fields .