private void copyAttributes ( ElementBase src , LayoutElement dest ) { for ( PropertyInfo propInfo : src . getDefinition ( ) . getProperties ( ) ) { Object value = propInfo . isSerializable ( ) ? propInfo . getPropertyValue ( src ) : null ; String val = value == null ? null : propInfo . getPropertyType ( ) . getSerializer ( ) . serialize ( value ) ; if ( ! ObjectUtils . equals ( value , propInfo . getDefault ( ) ) ) { dest . getAttributes ( ) . put ( propInfo . getId ( ) , val ) ; } } }
Copy attributes from a UI element to layout element .