두 개의 하위 컨테이너가있는 dijit.layout.AccordionContainer
을 사용하는 앱이 있습니다.클릭시 AccordionContainer를 전환하는 방법은 무엇입니까?
지도가로드되면 컨테이너 중 하나가 기본적으로 열립니다. 기본 컨테이너가 닫히고 버튼을 클릭하면 두 번째 컨테이너가 열리길 원합니다. 어떤 생각을 어떻게 할 것인가?
나는 selectChild()
방법을 사용해 보았지만 반드시 잘못하고 있어야합니다.
EDIT 내 HTML은 : 나는 내가 클릭에
JS 일어날 필요가 다른 것을 위해 만든 기능을 통해 클릭에 "TAB2"을 열려고하고
<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>
:
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);
}
위젯을 어떻게 만드나요? selectChild()를 어떻게 호출합니까? Dojo의 버전은 무엇입니까? (http://jsfiddle.net/H7Zh8/29 /)는 괜찮은 질문을하는 것처럼 보입니다. – Default
내 코드를 표시하도록 내 질문을 편집했습니다. selectChild() 참조가 제거 된 것 같습니다. 그것을 올바르게하는 것. – Craig
그 바이올린 트릭 않았다. 도와 주셔서 감사합니다. 귀하가 귀하의 의견을 답변으로 기재한다면 나는 답변으로 표시 할 것입니다. 다시 한 번 감사드립니다! – Craig