boon/src/main/java/org/boon/messages/MessageUtils.java
public static String createLabelWithNameSpace( final String namespace, final String fieldName,
                                                   final ResourceBundle bundle ) {

        String label;
        try {
            try {
                /** Look for name-space + . + fieldName, e.g., Employee.firstName. */
                label = bundle.getString( namespace + '.' + fieldName );
            } catch ( MissingResourceException mre ) {
                /** Look for fieldName only, e.g., firstName. */
                label = bundle.getString( fieldName );
            }
        } catch ( MissingResourceException mre ) {
            /** If you can't find the label, generate it thus, "firstName" becomes "First Name".*/
            label = generateLabelValue( fieldName );
        }

        return label;
    }
public static String createLabelWithNameSpace( final String namespace, final String fieldName,
                                                   final ResourceBundle bundle ) {

        String label;
        try {
            try {
                /** Look for name-space + . + fieldName, e.g., Employee.firstName. */
                label = bundle.getString( namespace + '.' + fieldName );
            } catch ( MissingResourceException mre ) {
                /** Look for fieldName only, e.g., firstName. */
                label = bundle.getString( fieldName );
            }
        } catch ( MissingResourceException mre ) {
            /** If you can't find the label, generate it thus, "firstName" becomes "First Name".*/
            label = generateLabelValue( fieldName );
        }

        return label;
    }
public static String createLabelWithNameSpace ( final String namespace , final String fieldName , final ResourceBundle bundle ) { String label ; try { try { /** Look for name-space + . + fieldName, e.g., Employee.firstName. */ label = bundle . getString ( namespace + ' ' + fieldName ) ; } catch ( MissingResourceException mre ) { /** Look for fieldName only, e.g., firstName. */ label = bundle . getString ( fieldName ) ; } } catch ( MissingResourceException mre ) { /** If you can't find the label, generate it thus, "firstName" becomes "First Name".*/ label = generateLabelValue ( fieldName ) ; } return label ; }
Get the field label.

@param namespace Namespace is a qualifier usually the name of a Form or Entity.
@param fieldName fieldName is the name of the label we want to look up.
@param bundle    ResourceBundle
@return Label from the Message Source.
Get the field label .