Any way to write to a file on the gateway or to database from javascript?

im making quite the complex table component xD… Where its possible to group/filter/rearrange column and rows in the clients browser. And to save these layout states and apply the one you want, for now i save it in a db using some bindings, but now im trying to make it so it can work without having to use bindings/external code.

(both chart and table are one and the same component, chart can be opened by a context menu on right click)
image

And yeah i guess that is possible, But i think ill be happy if it works in just the java bit lol, my java is a bit rusty. And its not so important where the states get saved anyway