EWA Refresh Button click via code

I have created a dashboard and customized the form to automatically click the refresh button in the Load event like this:

MainController.AppControlPanel.HandleToolClick("RefreshTool", new 				Infragistics.Win.UltraWinToolbars.ToolClickEventArgs(MainController.MainToolManager.Tools["RefreshTool"], null));

which works great in the client but I have tried to deploy this as an EWA form and it doesn’t work. Does anyone know how to accomplish this for EWA?