sb.append(getHiddenMarkup(FactoryURL.PARAMETER_BEAN, bean));
sb.append(getHiddenMarkup(FactoryURL.PARAMETER_ACTION, action));
// Add the CSRF protection token
if (CSRFTokenProcessor.lookup().isEnabled()) {
CSRFTokenGenerator csrfTokenGenerator = CSRFTokenGenerator.lookup();
sb.append(getHiddenMarkup(csrfTokenGenerator.getTokenName(), csrfTokenGenerator.getLastToken()));
}
try {
BeanHandler element = (BeanHandler) CDIBeanLocator.getBeanByNameOrType(bean);
element.setEnabledForActionHandling(true);