Project

General

Profile

1
/*
2
Author:       Cameron Shorter cameronAtshorter.net
3
License:      LGPL as per: http://www.gnu.org/copyleft/lesser.html
4

    
5
$Id: SelectFromAtomFeed.js 3888 2008-02-27 18:25:45Z ahocevar $
6
*/
7

    
8
// Ensure this object's dependancies are loaded.
9
mapbuilder.loadScript(baseDir+"/widget/WidgetBaseXSL.js");
10

    
11
/**
12
 * A widget which displays a list of atom elements to select from. The
13
 * selected element's URL is loaded as a model, usually a context model.
14
 * @constructor
15
 * @base WidgetBaseXSL
16
 * @param widgetNode  The widget's XML object node from the configuration document.
17
 * @param model       The model object that this widget belongs to.
18
 */
19

    
20
function SelectFromAtomFeed(widgetNode, model) {
21
  WidgetBaseXSL.apply(this,new Array(widgetNode, model));
22

    
23
  /**
24
   * Switch to another model (usually a map context).
25
   * This function is called from SelectFromAtomFeed.xsl
26
   * @param objRef this widget
27
   * @modelUrl the URL of the XML we want to switch to.
28
   */
29
  SelectFromAtomFeed.prototype.switchModel=function(objRef, modelUrl) {
30
    config.loadModel( this.targetModel.id, modelUrl );
31
  }
32
}
(107-107/145)