Search in sources :

Example 1 with MetadataTargetImpl

use of org.apache.myfaces.view.facelets.tag.MetadataTargetImpl in project myfaces by apache.

the class CompositeMetaRulesetImpl method _getBaseMetadataTarget.

private MetadataTarget _getBaseMetadataTarget() {
    Map<String, MetadataTarget> metadata = getMetaData();
    String key = _type.getName();
    MetadataTarget meta = metadata.get(key);
    if (meta == null) {
        try {
            if (PropertyDescriptorUtils.isUseLambdaMetafactory(FacesContext.getCurrentInstance().getExternalContext())) {
                meta = new LambdaMetadataTargetImpl(_type);
            } else {
                meta = new MetadataTargetImpl(_type);
            }
        } catch (IntrospectionException e) {
            throw new TagException(_tag, "Error Creating TargetMetadata", e);
        }
        metadata.put(key, meta);
    }
    return meta;
}
Also used : LambdaMetadataTargetImpl(org.apache.myfaces.view.facelets.tag.LambdaMetadataTargetImpl) MetadataTarget(jakarta.faces.view.facelets.MetadataTarget) TagException(jakarta.faces.view.facelets.TagException) IntrospectionException(java.beans.IntrospectionException) MetadataTargetImpl(org.apache.myfaces.view.facelets.tag.MetadataTargetImpl) LambdaMetadataTargetImpl(org.apache.myfaces.view.facelets.tag.LambdaMetadataTargetImpl)

Aggregations

MetadataTarget (jakarta.faces.view.facelets.MetadataTarget)1 TagException (jakarta.faces.view.facelets.TagException)1 IntrospectionException (java.beans.IntrospectionException)1 LambdaMetadataTargetImpl (org.apache.myfaces.view.facelets.tag.LambdaMetadataTargetImpl)1 MetadataTargetImpl (org.apache.myfaces.view.facelets.tag.MetadataTargetImpl)1