Put back missing setValue function

- Put back setValue function removed in a js refactor.