我可以在道场手风琴中打开特定条目吗

我可以在道场手风琴中打开特定条目吗

本文介绍了我可以在道场手风琴中打开特定条目吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的应用程序的左侧导航中放置链接,以打开 xPage 并选择特定的手风琴条目.不知道该怎么做

I want to put links in the left navigation of my application that open an xPage and select a specific accordion entry. Not sure how to do this

有什么想法吗?

推荐答案

我在这里假设您想以编程方式执行此操作.查看这个答案 - https://stackoverflow.com/a/1190455/1047998 - 描述了 selectChild 用于选择特定的手风琴窗格.您还可以浏览 dijit.layout.AccordionContainer 的 Dojo API 文档 - http://dojotoolkit.org/api/1.6/dijit/layout/AccordionContainer - 您可以在其中参考 selectChild 的文档.

I am assuming here that you want to do this programmatically. Look into this answer- https://stackoverflow.com/a/1190455/1047998 - which describes the usage of selectChild which is used to select specific accordion pane. You can also go through the Dojo API documentation of dijit.layout.AccordionContainer - http://dojotoolkit.org/api/1.6/dijit/layout/AccordionContainer - where you can refer the documentation for selectChild.

更新:

假设您像这样定义手风琴容器:

So let's say if you define your accordion container like this:

<xp:div dojoType="dijit.layout.AccordionContainer" id="accordionContainer">
    <xp:div dojoType="dijit.layout.ContentPane" id="pane1" title="Pane 1">
        Content 1
    </xp:div>
    <xp:div dojoType="dijit.layout.ContentPane" title="Pane 2" id="pane2">
        Content 2
    </xp:div>
    <xp:div dojoType="dijit.layout.ContentPane" title="Pane 3" id="pane3">
        Content 3
    </xp:div>
    <xp:div dojoType="dijit.layout.ContentPane" title="Pane 4" id="pane4">
        Content 4
    </xp:div>
</xp:div>

所以选择 pane3 JavaScript 代码应该是这样的:

So to select pane3 JavaScript code would be like:

var ac = dijit.byId("#{id:accordionContainer}");
ac.selectChild(dijit.byId("#{id:pane3}"));

这篇关于我可以在道场手风琴中打开特定条目吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-29 12:33