public void setFeature ( Feature feature ) { List < Feature > features = new ArrayList < Feature > ( ) ; features . add ( feature ) ; LazyLoader . lazyLoad ( features , GeomajasConstant . FEATURE_INCLUDE_ATTRIBUTES , new LazyLoadCallback ( ) { public void execute ( List < Feature > response ) { Feature feature = response . get ( 0 ) ; if ( attributeTable == null ) { buildWidget ( feature . getLayer ( ) ) ; } if ( feature != null ) { setTitle ( I18nProvider . getAttribute ( ) . getAttributeWindowTitle ( feature . getLabel ( ) ) ) ; } else { setTitle ( I18nProvider . getAttribute ( ) . getAttributeWindowTitle ( "" ) ) ; } attributeTable . setFeature ( feature ) ; } } ) ; }
Apply a new feature onto this widget assuring the attributes are loaded .