0

簡単なモバイル・アプリを作成しました (Worklight Studio を使用)。このアプリに Dojo 機能を追加します。だから、私はTabBarを持っていて、タブをクリックすると何らかのアクションが必要です

MainPage.html (の一部)

<ul data-dojo-type="dojox.mobile.TabBar">
<li id="accountInfoButton" data-dojo-type="dojox.mobile.TabBarButton" icon="images/AccountInfoIcon.png" data-dojo-props="transition:'slide',dir:'1',url : 'views/account_info.html'">Account Info</li>

account_info.html

<div data-dojo-type="dojox/mobile/RoundRect" shadow="true">
<input id="name" dojoType="dojox.mobile.TextBox" selectOnClick="true" type=text name="name"></input>
</div>
<script src="../js/AccountInfoLoad.js"></script>

AccountInfoLoad.js

require("dojo/ready", function(ready){
    ready(function(){
        dojo.byId("name").innerHTML = 'John Doe';
    });
});

しかし、[アカウント情報] タブをクリックしても何も起こりません

誰かがこれで私を助けることができますか?

ありがとう!!

4

1 に答える 1

0

From your code snippet, I believe this is not working for you because you are missing moveTo:'<view id>' in your data-dojo-props.
You need to specify the view to display in the page you are transitioning to.

The following works for me:

index.html

<div data-dojo-type="dojox.mobile.ScrollableView" id="view0" data-dojo-props="selected:true">
    Lorem ipsum dolor sit amet, ...

    <ul data-dojo-type="dojox.mobile.TabBar" fixed="bottom">
        <li data-dojo-type="dojox.mobile.TabBarButton" id="tab1" data-dojo-props="url:'view1.html', moveTo:'view1', transition:'flip'">Label</li>
    </ul>
</div>

view1.html

<div data-dojo-type="dojox.mobile.View" id="view1" data-dojo-props="selected:false">
    In view 1   
</div>
于 2014-09-25T12:11:24.603 に答える