Browser Widget

Basics

The Browser widget is a very flexible Widget that lets you display rich content such as the images and HTML. Typically this will be used in conjunction with a URL field that allows you to pull in content from outside IJC using URLs to define the location of the data. The HTML can be also bound from a Text Field with text/html MIME type and HTML formatted text. It has this icon in the form builder design mode toolbar: images/download/attachments/44664463/widget-browser.png

The example below shows 2 Browser Widgets showing an image file of an NMR spectrum (top) and some details for the compound contained in an HTML document (bottom).

images/download/attachments/44664463/browser-widgets.png

The URL field used can be a static or a dynamic URL field. For more details on URL fields see the page URL Fields

The Browser Widget automatically detects the type of content based on the mime type of the data. It uses a special image display component for displaying images, and an HTML renderers for displaying HTML. You should try to ensure that the correct mime type is specified by the URL field definition and/or the web server that is serving the content.

The URL can also be opened in an external application. To do this move the mouse into the title region of the widget (at the top) and the URL will be shown as a popup. Click on the URL and it will open in whatever external application is configured by your operating system to handle this type of content.

Authentication

HTTP BASIC authentication is supported by browser widgets. If the resource is protected by a username and password a dialog will be shown that lets you enter these. The username and password is cached for the lifetime of the IJC session. There is no support for other types of authentication, or for cookies or any other form of state management.

Settings

To edit the settings in Design mode double click on the Widget and the settings editor will open. In either mode select the widget by single clicking on it and then click on the Widget Settings icon ( images/download/attachments/44664463/IJCWidgetProperties.png ) in the Form toolbar. Or alternatively right click on the widget and select Customize Widget Settings item.

The Browser Widget has relatively few settings:

  • Font settings for display of text

  • An option to auto-scale the images to fit the available space, or to display it at the original size. If the image is too big for the space available in the widget then you can pan around by dragging the image with the mouse.

The widget contents can be reloaded at any stage by right clicking on it and choosing 'Reload URL'.

Editing values

When the Browser Widget is being used to view data from a URL field the data is not editable.

When the Browser Widget is being used to view data from a binary field (stored within the database) the value can be edited by selecting a file or URL content for uploading into the database for that record. This allows you to load images (or similar content) into the database on a record-by-record basis.
images/download/attachments/44664463/Binarywidget.png

Query mode

Data for URL fields in Browser Widgets is not queryable, and the widget is disabled in query mode. For binary fields only very basic querying is enabled e.g. allowing IS NULL or IS NOT NULL type searches allowing you to find records with or without images.