分类: 系统运维
2009-09-10 15:49:06
|
这个变量是一个div,其中div中包含了动态数据$date,date这里可以不定义,也可以在这里定义,同样onClick也是。这个div输出的html大概是下面这样:
|
|
panelNode :
We are using panel's member variable panelNode, which represents content area of the panel - final HTML will be inserted into it. Notice that we are using getPanel function to get our panel for the current context (page) where panelName represents ID of the panel, see part II.
append接口的声明大概为:append(arg1, arg2, arg3)
This method has three parameters. The first one is used to provide data for the template. The second is the parent DOM node and the last represents context object (this) that contains callback methods (data providers and event handlers). It can be null in our case as we don't have any callbacks yet, but it's good practice to use the template itself. It's usually the template which defines all these callbacks. Return value is root element of the created DOM (we don't need it for now).
args中包含了对date的定义,用于传给后面的myTag。
这里对date和onClick的寻找顺序是按 arg1 -> arg3 -> helloWorldRep本身,也就是说date和onClick只要存在arg1、arg3或者helloWorldRep的定义里面就行了。
值得注意的是:
关于append的定义,后面估计还要详细查一下