@SuppressWarnings("deprecation")
public void applyMetadata(FaceletContext ctx, Object instance)
{
ValueExpression expr = _attribute.getValueExpression(ctx, String.class);
UIXComponent uixcomp = (UIXComponent) instance;
FacesBean bean = uixcomp.getFacesBean();
PropertyKey mainKey = bean.getType().findKey(_mainMethodName);
if (mainKey == null)
throw new TagAttributeException(_attribute,
"No support for '" + _mainMethodName +
"' attribute on " + instance);
PropertyKey accessKeyKey = bean.getType().findKey("accessKey");
if (accessKeyKey == null)
throw new TagAttributeException(_attribute,
"No support for 'accessKey' attribute on " + instance);
VirtualAttributeUtils.setAccessKeyAttribute(bean, expr, mainKey, accessKeyKey);
}