Package bm.ui.def.view

Examples of bm.ui.def.view.AttachmentDef


    {
        final Vector attachments = def.getAttachments();
        final int count = attachments.size();
        for( int i = 0; i < count; i++ )
        {
            final AttachmentDef attachment = (AttachmentDef)
                    attachments.elementAt( i );
            final String type = attachment.getType();
            if( type != null )
            {
                Object value;
                final String rawValue = attachment.getValue();
                if( type.equals( "int" ) )
                {
                    try
                    {
                        value = Integer.valueOf( rawValue );
                    }
                    catch( NumberFormatException e )
                    {
                        value = new Integer( 0 );
                    }
                }
                else if( type.equals( "boolean" ) )
                {
                    value = new Boolean(
                            rawValue != null && rawValue.equals( "true" )
                    );
                }
                else
                {
                    value = rawValue;
                }
                view.attach( attachment.getName(), value );
            }
        }
    }
View Full Code Here

TOP

Related Classes of bm.ui.def.view.AttachmentDef

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.