public BaseViewBean accessBean(String beanName, Class viewClass) {
StringBuffer valueBinding = new StringBuffer();
valueBinding.append(CERQUILHA);
valueBinding.append(ABRE_CHAVES);
valueBinding.append(beanName);
valueBinding.append(FECHA_CHAVES);
ValueExpression exp = context.getApplication().getExpressionFactory()
.createValueExpression(context.getELContext(),
valueBinding.toString(), viewClass);
BaseViewBean bean = (BaseViewBean) exp.getValue(context.getELContext());
return bean;
}
Onde:
BaseViewBean - Classe ManagedBean padrão da qual todas extendem.
Nenhum comentário:
Postar um comentário