This widget allows remote WMS service layer browsing and adding to your map. See WMSBrowser.js for the source code.
You can select an url from the top list or enter one, then click 'connect'. The list of available layers appear on the left. When one is checked (selected), more info appear on the right and a small map shows a preview of the data selected. If more than one layer is selected, only the last one selected has its info shown, but all layers are merged in the preview.
The name of the layer is automatically generated by a combinaison of the selected layers, but it can also be manually set. Clicking the 'Add layer' button add the combinaison of the selected layers as a single OpenLayers.Layer.WMS layer object to your map.
Among its features, the widget offers srs and extent validation with your map. The layer list on the left can either be a Tree (default) or a Grid. If the StatusBar ux widget (in Ext) source code is loaded, one is automatically added to the widget allowing messages to be displayed as it executes different tasks or when an error occurs. If none is provided, only the errors are shown in a Ext.Window. It's also translated in French.
Please note : in order to work properly with external urls, you need to setup a proxy. You can either set the OpenLayers.ProxyHost or use the widget local proxy setting. In this demo, plain local xml files are used to avoid the setting of a proxy. There's a php one located in this sample which you can use locally.