public static MethodExpression createMethodExpression(String valueExpression,
            Class<?> expectedReturnType) {
        FacesContext fc = FacesContext.getCurrentInstance();
        ExpressionFactory factory = fc.getApplication().getExpressionFactory();

        return factory.createMethodExpression(fc.getELContext(),
                valueExpression, expectedReturnType, new Class<?>[0]);
    }