* @see Faces#getMetadataAttributes(String)
*/
public static Map<String, Object> getMetadataAttributes(FacesContext context, String viewId) {
ViewHandler viewHandler = context.getApplication().getViewHandler();
ViewDeclarationLanguage vdl = viewHandler.getViewDeclarationLanguage(context, viewId);
ViewMetadata metadata = vdl.getViewMetadata(context, viewId);
return (metadata != null)
? metadata.createMetadataView(context).getAttributes()
: Collections.<String, Object>emptyMap();
}