beanExpression = expressionFactory.createValueExpression(facesContext
.getELContext(), "#{registeraction}", RegisterAction.class);
states.put("action", beanExpression);
// Define method expression inside registeraction binding for this state
MethodExpression methodExpression = expressionFactory.createMethodExpression(
facesContext.getELContext(), "#{registeraction.ok}",
String.class, new Class[] {});
states.put("ok", methodExpression);
// Outcome for switching to login state definition