Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title> new document </title>
- <meta name="generator" content="editplus" />
- <meta name="author" content="" />
- <meta name="keywords" content="" />
- <meta name="description" content="" />
- <script djConfig=" isDebug: true, useCommentedJson: true,parseOnLoad: true" src="http://127.0.0.1/Eclipse_projects/quickstart/public/JS/dojo150r/dojo/dojo.js"></script>
- <style type="text/css">
- @import "http://127.0.0.1/Eclipse_projects/quickstart/public/JS/dojo150r/dojo/resources/dojo.css";
- @import "http://127.0.0.1/Eclipse_projects/quickstart/public/JS/dojo150r/dijit/themes/soria/soria.css";
- </style>
- <style type="text/css">
- </style>
- <link id="themeStyles" rel="stylesheet" href="">
- <script type="text/javascript">
- dojo.require("dijit._Widget");
- dojo.require("dijit._Templated");
- dojo.ready(function(){
- dojo.byId('log').value='';
- dojo.declare("MyWidget", [dijit._Widget, dijit._Templated], {
- templateString: '<div id="MyWidget_${id}" dojoAttachPoint="x"><input id="${id}" name="bar"/></div>',
- constructor:function(params, srcNodeRef){
- },
- buildRendering: function(){
- this.inherited("buildRendering",arguments);
- log('buildRendering this.x.id : '+ this.x.id);
- dumpParent( this.x);
- //this.id=this.domNode.id;
- },
- postCreate: function(){
- this.inherited("postCreate",arguments);
- log('postCreate this.x.id : '+ this.x.id);
- dumpParent( this.x);
- },
- startup: function(){
- this.inherited("startup",arguments);
- log('startup this.x.id : '+ this.x.id);
- dumpParent( this.x);
- }
- });
- var y;
- var x=new MyWidget({},dojo.byId('j'));
- x.startup();
- log("logged: "+dijit.registry.byClass("MyWidget"));
- console.log(dijit.registry.byClass("MyWidget"));
- });
- function log(msg){
- dojo.byId('log').value+=(msg+"\n");
- }
- function dumpParent(element)
- {
- if(element.parentNode)
- dojo.byId('log').value+=(
- "-----------------\n\t"+
- element.parentNode.innerHTML+
- "\n-----------------\n");
- else
- dojo.byId('log').value+=("parentNode is NULL\n");
- }
- </script>
- </head>
- <body class="soria">
- <div id="sd"><input type="text" name="j" id="j" /></div>
- <textarea id='log' style="width:600px;height:200px;"></textarea>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement