Passing java objects to javascript