In my code I have this button

```
 <div>#{gui.button  onClick:"previewPage()"/}</div>

```

, and when click it I it goes to the function :

```

function previewPage() {
    window.open('@{Controller.previewErrorPage()}, '_blank');
}

```

this method open new tab and show html page.
this function call the controller in the server side .
After that it enter one more time to the same method (previewPage).

which mean when click the button, the previewPage method call twice, and the controller also execute twice, and it open 2 tabs.

```
public void previewPage(ErrorPage errorPage, Long accountId) {

        renderHtml(...).toString()));
    }

```

this is the controller that the function called .