Set:
ValueExpression el = Expressions.instance().createValueExpression("#{annualPlanningId}");
el.setValue((Integer) Contexts.getSessionContext().get(
"annualPlanningId"));
Get:
System.out.println(Expressions.instance().createValueExpression("#{annualPlanningId}").getValue());