How do I specify which pane to display when the accordion is loaded?
Tech Specs:
Declarative programming
Background Info:
On the dijit documentation page, it says the first pane will open by default
unless I specify differently. However, the example accordion widgets
display the second pane upon load - and I don't see where that was declared
in the code.
http://dojotoolkit.org/reference-guide/dijit/layout/AccordionContainer.html
.AccordionContainer documentation
--
View this message in context: http://dojo-toolkit.33424.n3.nabble.com/AccordionContainer-How-do-I-specify-which-pane-to-display-when-the-accordion-is-loaded-tp2828339p2828339.html
Sent from the Dojo Toolkit mailing list archive at Nabble.com.
_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://docs.dojocampus.org
Dojo-i...@mail.dojotoolkit.org
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
<div dojoType="dijit.layout.ContentPane" title="This is as well"
selected="true"> <--- selected.....
-Karl Tiedt
The attribute selected='true' should work on the child you want to be
shown, or add that one last.
There is gold in the JSDocs on what is available on any given widget.
Regrettably, Ted, there's nothing in the JSDocs about how to simply put
selected="true"... it's a glaring omission isn't it? I do see how the HTML
source code identifies the open pane with selected="true". Still, it would
be helpful for Dojo newbies to find that documented somewhere.
Here's the page I'm referring to:
http://dojotoolkit.org/reference-guide/dijit/layout/AccordionContainer.html
--
View this message in context: http://dojo-toolkit.33424.n3.nabble.com/AccordionContainer-How-do-I-specify-which-pane-to-display-when-the-accordion-is-loaded-tp2828339p2832307.html
The JS Docs link is at the top of the page you cite.
http://dojotoolkit.org/api/dijit.layout.AccordionContainer I don't know,
but I suspect that the examples are kept simple for a reason.
IIRC, Dojo is open source, so if you have patches to correct glaring
omissions in the documentation, I'm sure there's some process for you to
submit it, and it will be welcomed.
Granted, that's not necessarily going to be readily apparent. I notice
there's also a slight mention of it in TabContainer's reference-guide
page (though it's actually a feature of StackContainer, from which both
TabContainer and AccordionContainer inherit):
http://dojotoolkit.org/reference-guide/dijit/layout/TabContainer.html#selecting-another-tab
RE contributing patches/docs, if one is so inclined:
The API docs are generated from specifically-formatted comments in the
source code; a patch to this ought to be submitted via
http://bugs.dojotoolkit.org
The reference-guide is generated at each release from the wiki at
http://docs.dojocampus.org (note that this is a wiki, and therefore is
apt to have some documentation of features present only in trunk).
You can get an account for both of these at http://my.dojofoundation.org
Note that a signed contributor's license agreement (CLA) is generally
required for acceptance of non-trivial changes/additions. See
http://dojofoundation.org/about/cla (there's also a broader explanation
at http://dojotoolkit.org/get-involved).
--Ken