Can Web Browser component be linked with Tab Strip component

Here’s the scenario:

I have two tabs, one is Google, other is Yahoo. When I click on Google Tab I want web browser to go to web page, when I click on Yahoo Tab I want web browser to go to web page. How do I link Tabs to Web browser component?


You can bind the Starting URL property in the Web Browser. As an example, I put a Web Browser into a window, and added two buttons. One has an actionPerformed script of event.source.parent.getComponent('Web Browser').startingUrl = "" and the other has a script of event.source.parent.getComponent('Web Browser').startingUrl = "" Clicking on each of them sends the browser to the appropriate site.

OK, that’s for using Buttons, however, would I need to create custom property (dataset) for the Tabs and include both URLs. How would the script look like then?


Bind the starting startingUrl to selectedTab of the tabstrip.
If you have two tabs called “google” and “yahoo” use the following expression on the binding.

concat("www.",{Root Container.Tab Strip.selectedTab},".com")

Cool, it works. Now, is Web browser able to view PDF documents. What file extension is it compatible with? For videos and images specifically?


The Web Browser is based on the Chromium engine, so anything a stock Chromium engine can display (note: this is NOT the same as what Google Chrome can display, even though it is based on Chromium).

I haven’t heard of any still image formats that cause problems. For video, I know the h.264 codec can’t be displayed, but I don’t know of other issues.

I tested to see if it can open a PDF file, but it asks me to save the file instead. So, I guess it can’t view PDF unless there is some kind of plug-in for PDFs.

The most recent version of the module can view pdfs. The version that shipped with 7.7.0 couldn’t.

Awesome it works, it doesn’t seem to work with flash videos like .flv or .swf…what kind does it support?


I would think that the Chromium audio/video webpage would be a good source. Remember to only go by the Chromium lists, not the Chrome lists. :smiley:

If you have control over the client machines, you can install plug-ins. Adobe, for example, gives instructions on how to make Flash play with Chromium.

Lets say I want to play samplevideo.flv on the browser itself, So I provide the link for it. I open it and it won’t play the video. Is that with all video formats? I cant just open a direct link to a video. Do videos need to be embedded with HTML code in order to play in the Web Browser?


Good question.

I just went to in the Web Browser component, and had no problem viewing the video (although it does take a couple of seconds to load). So that tells me that flash video embedded in html works (at least on my machine).

Then I tried, a link directly to a flash video file. Not unexpectedly, the Web Browser asked me if I’d like to save it (the same thing happened in my regular web browser). So a direct link to the video itself doesn’t work.

Yea, I can watch Youtube and other flash videos with no problem, but trying to watch a video link does not work. So I think because it is a “Web Browser” it requires HTML code to wrap around the videos.

Off topic question but, I have a integer tag and I want to display the word “Hello World” when the tag changes to 2. How do I write script for it?


Best to put a new topic in a new topic – you’re much more likely to get a useful reply. :slight_smile: