2 つの「子コンテナー」で dijit.layout.AccordionContainer を使用するアプリがあります。
マップが読み込まれると、コンテナの 1 つがデフォルトで開かれます。ボタンがクリックされたときにデフォルトのコンテナを閉じて、2 番目のコンテナを開くようにしたいと思います。これを行う方法はありますか?
selectChild() メソッドを使用してみましたが、間違っているか、完全にベースから外れているに違いありません。
編集 私のHTMLは次のとおりです。
<div dojotype="dijit.layout.ContentPane" id="leftPane" region="left" splitter="true">
<div dojotype="dijit.layout.AccordionContainer">
<div dojotype="dijit.layout.ContentPane" title="Table of Contents">
<div id="tocDiv">
</div>
</div>
<div dojotype="dijit.layout.ContentPane" title="Search Results" id="tab2">
<div id="datagrid">
<table data-dojo-type="dojox.grid.DataGrid" data-dojo-id="grid" id="grid" data-dojo-props="rowsPerPage:'5', rowSelector:'20px'">
<thead>
<tr>
<th field="Parcel Identification Number" width="25%">
Parcel ID
</th>
<th field="Site Address" width="30%">
Address
</th>
</tr>
</thead>
</table>
</div>
</div>
</div>
</div>
クリック時に必要な他のことのために作成した関数を介して、クリック時に「tab2」を開こうとしています
JS:
function doFind() {
//Set the search text to the value in the box
findParams.searchText = dojo.byId("parcel").value;
grid.showMessage("Loading..."); //Shows the Loading Message until search results are returned.
findTask.execute(findParams,showResults);
}