r20514: implement idl for DsGetNT4ChangeLog() which transferres the meta data
[ira/wip.git] / webapps / qooxdoo-0.6.3-sdk / frontend / framework / source / class / qx / ui / embed / NodeEmbed.js
1 /* ************************************************************************
2
3    qooxdoo - the new era of web development
4
5    http://qooxdoo.org
6
7    Copyright:
8      2004-2006 by 1&1 Internet AG, Germany, http://www.1and1.org
9
10    License:
11      LGPL 2.1: http://www.gnu.org/licenses/lgpl.html
12
13    Authors:
14      * Sebastian Werner (wpbasti)
15      * Andreas Ecker (ecker)
16
17 ************************************************************************ */
18
19 /* ************************************************************************
20
21 #module(ui_basic)
22
23 ************************************************************************ */
24
25 qx.OO.defineClass("qx.ui.embed.NodeEmbed", qx.ui.basic.Terminator,
26 function(vId)
27 {
28   qx.ui.basic.Terminator.call(this);
29
30   if (qx.util.Validation.isValidString(vId)) {
31     this.setSourceNodeId(vId);
32   }
33 });
34
35 qx.OO.addProperty({ name : "sourceNodeId", type : "string" });
36
37 qx.Proto._createElementImpl = function()
38 {
39   var vNode = document.getElementById(this.getSourceNodeId());
40
41   if (!vNode) {
42     throw new Error("Could not find source node with ID: " + this.getSourceNodeId());
43   }
44
45   vNode.style.display = "";
46
47   return this.setElement(vNode);
48 }