empire-db-jakarta-faces/src/main/java/org/apache/empire/jakarta/utils/TagEncodingHelper.java [1453:1510]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public String getValueTooltip(Object value)
    {
        if (value == null)
            return null;
        // is it a column
        if (value instanceof Column)
        {   // find column value   
            Column ttc = ((Column)value);
            if (getRecord() != null)
            {   // value
                if (record instanceof RecordData)
                {   // a record
                    value = ((RecordData) record).get(ttc);
                    // convert to enum
                    Class<Enum<?>> enumType = ttc.getEnumType();
                    if (enumType!=null && !(value instanceof Enum))
                        value = ObjectUtils.getEnum(enumType, value);
                }
                else
                { // a normal bean
                    String prop = ttc.getBeanPropertyName();
                    value = getBeanPropertyValue(record, prop);
                }
                // resolve options
                Options options = (value==null || value instanceof Enum) ? null : ttc.getOptions();
                if (options!=null && !hasFormat("notitlelookup"))
                    value = options.get(value);
                // convert to display text
                return getDisplayText(ttc, value);
            } 
            else
            {   // Error
                log.warn("Unable to resolve Tooltip-value for column {}.", ttc.getName());
                return null;
            }
        }
        // is it a template?
        String templ = StringUtils.valueOf(value);
        int valIndex = templ.indexOf("{}");
        if (valIndex >= 0)
            value = getDataValue(true);
        // Check Options
        String text = null;
        Options options;
        if (!hasFormat("notitlelookup") && (options=getValueOptions())!=null)
        { // Lookup the title
            String optValue = options.get(value);
            text = getDisplayText(column, optValue);
        }
        else
        {   // resolveText
            text = getDisplayText(column, value);
        }
        // Check for template
        if (valIndex >= 0 && text!=null)
            text = StringUtils.replace(templ, "{}", text);
        return text;
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



empire-db-jsf2/src/main/java/org/apache/empire/jsf2/utils/TagEncodingHelper.java [1453:1510]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public String getValueTooltip(Object value)
    {
        if (value == null)
            return null;
        // is it a column
        if (value instanceof Column)
        {   // find column value   
            Column ttc = ((Column)value);
            if (getRecord() != null)
            {   // value
                if (record instanceof RecordData)
                {   // a record
                    value = ((RecordData) record).get(ttc);
                    // convert to enum
                    Class<Enum<?>> enumType = ttc.getEnumType();
                    if (enumType!=null && !(value instanceof Enum))
                        value = ObjectUtils.getEnum(enumType, value);
                }
                else
                { // a normal bean
                    String prop = ttc.getBeanPropertyName();
                    value = getBeanPropertyValue(record, prop);
                }
                // resolve options
                Options options = (value==null || value instanceof Enum) ? null : ttc.getOptions();
                if (options!=null && !hasFormat("notitlelookup"))
                    value = options.get(value);
                // convert to display text
                return getDisplayText(ttc, value);
            } 
            else
            {   // Error
                log.warn("Unable to resolve Tooltip-value for column {}.", ttc.getName());
                return null;
            }
        }
        // is it a template?
        String templ = StringUtils.valueOf(value);
        int valIndex = templ.indexOf("{}");
        if (valIndex >= 0)
            value = getDataValue(true);
        // Check Options
        String text = null;
        Options options;
        if (!hasFormat("notitlelookup") && (options=getValueOptions())!=null)
        { // Lookup the title
            String optValue = options.get(value);
            text = getDisplayText(column, optValue);
        }
        else
        {   // resolveText
            text = getDisplayText(column, value);
        }
        // Check for template
        if (valIndex >= 0 && text!=null)
            text = StringUtils.replace(templ, "{}", text);
        return text;
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



