if (target instanceof MetaComponentEncoder) {
String metaComponentId = (String) facesContext.getAttributes().get(ExtendedVisitContext.META_COMPONENT_ID);
if (metaComponentId != null) {
MetaComponentEncoder encoder = (MetaComponentEncoder) target;
try {
encoder.encodeMetaComponent(facesContext, metaComponentId);
} catch (Exception e) {
if (LOG.isErrorEnabled()) {
LOG.error(e.getMessage(), e);
}
throw new FacesException(String.format("exception thrown during encoding of meta-component %s@%s", target.getId(), metaComponentId), e);