Dynamic Content Loading

Partial Update Using dojox/mobile/ContentPane

In this example,there is a dojox/mobile/ContentPane widget in the transition target view. dojox/mobile/ContentPane is a very simple container widget,so it can be thought of as a <div> with the “href” attribute. This example updates the ContentPane with an external html fragment,and then performs a transition.
myAction6 = function(){
var pane1 = registry.byId("pane1");
if(!pane1.domNode.innerHTML){ // nothing has been loaded yet
connect.connect(pane1,"onLoad",this,function(){
// onLoad fires when the content is ready
this.transitionTo("view6");
});
pane1.set("href","fragment1.html");
}else{
this.transitionTo("view6");
}
}
<div id="view6" data-dojo-type="dojox/mobile/ScrollableView">
<h1 data-dojo-type="dojox/mobile/heading" data-dojo-props='back:"Home",moveto:"home",fixed:"top"'>Partial Update</h1>
<h2 data-dojo-type="dojox/mobile/RoundRectCategory">Dynamic Content</h2>
<div id="pane1" data-dojo-type="dojox/mobile/ContentPane"></div>
<ul data-dojo-type="dojox/mobile/RoundRectList">
<li data-dojo-type="dojox/mobile/ListItem" data-dojo-props='moveto:"home",transitionDir:-1'>
Home
</li>
</ul>
</div>

转自:http://dojotoolkit.org/reference-guide/1.9/dojox/mobile/dynamic-content-loading.html#dynamic-content-loading

相关文章

我有一个网格,可以根据更大的树结构编辑小块数据.为了更容易...
我即将开始开发一款教育性的视频游戏.我已经决定以一种我可以...
我正在使用带有Grails2.3.9的Dojo1.9.DojoNumberTextBox小部...
1.引言鉴于个人需求的转变,本系列将记录自学arcgisapiforja...
我正在阅读使用dojo’sdeclare进行类创建的语法.描述令人困惑...
我的团队由更多的java人员和JavaScript经验丰富组成.我知道这...