views:

172

answers:

2

Hello.

I am developing an application using ExtJS. I have an accordion and I need to select an active item(so it expands). Accordion.setActiveItem outputs: "setActiveItem" is not a function in a browser's error window.

Second issue is that hideCollapseTool property, when set to true in the initialisation, doesn't do anything. Collapse tools still are being displayed.

I am using ExtJS 3.1.1. I would be very thankful for any tips and answers.

A: 

You may need to change the syntax to Ext.getCmp(Accordian).setActiveItem(indexofitemtoactivate)....as the previous commenter mentions, a code excerpt woould be helpful in identifying the issue.

Ergo Summary
A: 

I have had little luck with setActiveItem myself. Examining it in Firebug, the accordion panel doesn't even have that method.

What I did to get around it was to call expand() on the item I want to have focus, e.g. :

accordion.items.itemAt(2).expand();
Jonathan Bates