From seam-commits at lists.jboss.org Wed Aug 26 19:29:17 2009 Content-Type: multipart/mixed; boundary="===============5553545960251048973==" MIME-Version: 1.0 From: seam-commits at lists.jboss.org To: seam-commits at lists.jboss.org Subject: [seam-commits] Seam SVN: r11436 - in sandbox/trunk/modules/xwidgets: examples/helloworld and 2 other directories. Date: Wed, 26 Aug 2009 19:29:17 -0400 Message-ID: <200908262329.n7QNTHgl001337@svn01.web.mwc.hst.phx2.redhat.com> --===============5553545960251048973== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: shane.bryzak(a)jboss.com Date: 2009-08-26 19:29:17 -0400 (Wed, 26 Aug 2009) New Revision: 11436 Added: sandbox/trunk/modules/xwidgets/examples/README sandbox/trunk/modules/xwidgets/examples/panels/ sandbox/trunk/modules/xwidgets/examples/panels/index.html sandbox/trunk/modules/xwidgets/examples/panels/panels.xw Removed: sandbox/trunk/modules/xwidgets/examples/helloworld/xw.Button.js sandbox/trunk/modules/xwidgets/examples/helloworld/xw.Label.js sandbox/trunk/modules/xwidgets/examples/helloworld/xw.Panel.js Modified: sandbox/trunk/modules/xwidgets/examples/helloworld/helloworld.xw sandbox/trunk/modules/xwidgets/examples/helloworld/index.html sandbox/trunk/modules/xwidgets/src/main/javascript/xw.Panel.js Log: minor fixes, add panels example Added: sandbox/trunk/modules/xwidgets/examples/README =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- sandbox/trunk/modules/xwidgets/examples/README = (rev 0) +++ sandbox/trunk/modules/xwidgets/examples/README 2009-08-26 23:29:17 UTC = (rev 11436) @@ -0,0 +1,10 @@ +Running the examples locally in Firefox +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +Because of Firefox's restrictive default settings, you may receive a secur= ity = +error when trying to load the examples. To get around this, you need to m= odify +Firefox's configuration by following these steps: + +1) type about:config in the address bar + +2) Find the setting security.fileuri.strict_origin_policy and change it to= false. Modified: sandbox/trunk/modules/xwidgets/examples/helloworld/helloworld.xw =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- sandbox/trunk/modules/xwidgets/examples/helloworld/helloworld.xw 2009-0= 8-26 22:51:54 UTC (rev 11435) +++ sandbox/trunk/modules/xwidgets/examples/helloworld/helloworld.xw 2009-0= 8-26 23:29:17 UTC (rev 11436) @@ -10,5 +10,6 @@ - + + Modified: sandbox/trunk/modules/xwidgets/examples/helloworld/index.html =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- sandbox/trunk/modules/xwidgets/examples/helloworld/index.html 2009-08-2= 6 22:51:54 UTC (rev 11435) +++ sandbox/trunk/modules/xwidgets/examples/helloworld/index.html 2009-08-2= 6 23:29:17 UTC (rev 11436) @@ -7,10 +7,9 @@ = Deleted: sandbox/trunk/modules/xwidgets/examples/helloworld/xw.Button.js =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- sandbox/trunk/modules/xwidgets/examples/helloworld/xw.Button.js 2009-08= -26 22:51:54 UTC (rev 11435) +++ sandbox/trunk/modules/xwidgets/examples/helloworld/xw.Button.js 2009-08= -26 23:29:17 UTC (rev 11436) @@ -1,36 +0,0 @@ -Package("xw.controls"); - -xw.controls.Button =3D function() -{ - this.control =3D null; - this.value =3D null; - = - xw.controls.Button.prototype.setParent =3D function(parent) - { - this.parent =3D parent; - } - = - xw.controls.Button.prototype.paint =3D function() - { - if (this.control =3D=3D null) - { - this.control =3D document.createElement("button"); - this.control.widget =3D this; - this.parent.control.appendChild(this.control); - var text =3D document.createTextNode(this.value); - this.control.appendChild(text); = - = - if (!xw.Sys.isUndefined(this.events)) - { = - if (!xw.Sys.isUndefined(this.events.onclick)) - { - var events =3D this.events; - var action =3D function() { - events.onclick.invoke(); - }; - xw.Sys.chainEvent(this.control, "click", action); - } - } - } = - } -} Deleted: sandbox/trunk/modules/xwidgets/examples/helloworld/xw.Label.js =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- sandbox/trunk/modules/xwidgets/examples/helloworld/xw.Label.js 2009-08-= 26 22:51:54 UTC (rev 11435) +++ sandbox/trunk/modules/xwidgets/examples/helloworld/xw.Label.js 2009-08-= 26 23:29:17 UTC (rev 11436) @@ -1,24 +0,0 @@ -Package("xw.controls"); - -xw.controls.Label =3D function() -{ - this.value =3D ""; - this.parent =3D null; - this.control =3D null; - = - xw.controls.Label.prototype.setParent =3D function(parent) - { - this.parent =3D parent; - } - = - xw.controls.Label.prototype.paint =3D function() - { - if (this.control =3D=3D null) - { - this.control =3D document.createTextNode(this.value); - // IE doesn't support setting random properties on text nodes - // this.control.widget =3D this; - this.parent.control.appendChild(this.control); - } = - } -} Deleted: sandbox/trunk/modules/xwidgets/examples/helloworld/xw.Panel.js =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- sandbox/trunk/modules/xwidgets/examples/helloworld/xw.Panel.js 2009-08-= 26 22:51:54 UTC (rev 11435) +++ sandbox/trunk/modules/xwidgets/examples/helloworld/xw.Panel.js 2009-08-= 26 23:29:17 UTC (rev 11436) @@ -1,64 +0,0 @@ -Package("xw.controls"); - -xw.controls.Panel =3D function() -{ - this.width =3D 200; - this.height =3D 100; = - this.parent =3D null; - this.control =3D null; - this.align =3D null; - = - xw.controls.Panel.prototype.setParent =3D function(parent) - { - this.parent =3D parent; - } - = - xw.controls.Panel.prototype.setAlign =3D function(align) - { - this.align =3D align; - } - = - xw.controls.Panel.prototype.setWidth =3D function(width) - { - this.width =3D width; - } - = - xw.controls.Panel.prototype.setHeight =3D function(height) - { - this.height =3D height; - } - = - xw.controls.Panel.prototype.paint =3D function(layout) - { - if (this.control =3D=3D null) - { - this.control =3D document.createElement("div"); - this.control.widget =3D this; = - this.control.style.backgroundColor =3D "#ece9d6"; - = - // TODO make the border more configurable (or allow it to be turned= off etc) - this.control.style.borderTop =3D "1px solid white"; - this.control.style.borderLeft =3D "1px solid white"; - this.control.style.borderBottom =3D "1px solid #555555"; - this.control.style.borderRight =3D "1px solid #555555"; - = - if (layout !=3D null) - { - layout.setBounds(this); - } - else - { - this.control.style.width =3D this.width; - this.control.style.height =3D this.height; = - this.control.style.display =3D "inline"; - } - - this.parent.control.appendChild(this.control); - } = - = - for (var i =3D 0; i < this.children.length; i++) - { - this.children[i].paint(); = - } = - } -} Added: sandbox/trunk/modules/xwidgets/examples/panels/index.html =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- sandbox/trunk/modules/xwidgets/examples/panels/index.html = (rev 0) +++ sandbox/trunk/modules/xwidgets/examples/panels/index.html 2009-08-26 23= :29:17 UTC (rev 11436) @@ -0,0 +1,16 @@ + + +

Panel Examples

+ = +
+ = + + = + + + Added: sandbox/trunk/modules/xwidgets/examples/panels/panels.xw =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- sandbox/trunk/modules/xwidgets/examples/panels/panels.xw = (rev 0) +++ sandbox/trunk/modules/xwidgets/examples/panels/panels.xw 2009-08-26 23:= 29:17 UTC (rev 11436) @@ -0,0 +1,22 @@ + + + + + + + + = + + = + = + + = + + + + Modified: sandbox/trunk/modules/xwidgets/src/main/javascript/xw.Panel.js =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- sandbox/trunk/modules/xwidgets/src/main/javascript/xw.Panel.js 2009-08-= 26 22:51:54 UTC (rev 11435) +++ sandbox/trunk/modules/xwidgets/src/main/javascript/xw.Panel.js 2009-08-= 26 23:29:17 UTC (rev 11436) @@ -56,9 +56,12 @@ this.parent.control.appendChild(this.control); } = = - for (var i =3D 0; i < this.children.length; i++) - { - this.children[i].paint(); = - } = + if (this.children) + { + for (var i =3D 0; i < this.children.length; i++) + { + this.children[i].paint(); = + } = + } = } } --===============5553545960251048973==--