Your function in java is right and gwt-exporter supports this syntax. The call from JS should be like:
window.handleAnchorClick(1, 2, [3,4], [5,6])
Your problem is that you are trying to call the exported method from a href
attribute in your html
and you are using a bad syntax.
First, it is better to use the onClick
attribute instead of href
, because you dont need the javascript:
tag, and it is better to prevent default. And, I'd rather define a function to do the call to avoid syntax issues.
<script>
var currentRow = 1;
var currentColumn = 2;
var rowVals = [3,4];
var colVals = [5,6];
function mycall() {
window.handleAnchorClick(currentRow, currentColumn, rowVals, colVals);
}
</script>
<!-- I prefer this -->
<a href="#" onClick="javascript:mycall()">click</a>
<!-- But this should work as well -->
<a href="#" onClick="window.handleAnchorClick(currentRow,currentColumn,rowVals,colVals)">click</a>