Validating the existance of a BrowserFrame

Hi all,

I’m setting up a page from which a user can check the version of our software that they have installed, then if needed push the user to an external site based on whether they have the most recent version or not. I’m doing this by having a line of text in page shown in a browser frame that passes the version number of the software to the web based php page and the php page changes it’s content based on the values it’s passed.

My dilemma is that if the page is not accessible they will get a 503/404 error page where this should be. I would rather only show their update status on the software if they can see the web page. Is there any way to validate their connection to this page before I add it to the layout or would you suggest a different method?

BrowserFrame browser = new BrowserFrame(null, new ExternalResource("http://www.myurl.com/software/latestVersion.php?version=1.0"));

Many thanks,

Andrew

Well, the BrowserFrame generates an Iframe in the browser, so the Vaadin clientside isn’t aware of what actually happens inside it. Sure, you could try, but that would require custom Javascript. Either that, or try loading the page on the server first (open new http connection, check response) and react on that.

I can’t validate it from the server because the server’s going to be behind a firewall that won’t allow it unfortunately. I’m investigating the custom Javascript and also
Accessing internet resources through the client
however I’m not feeling very hopeful unfortunately.