How do I Dynamically adding a new Collapsed Panel to an Accordion in Ext?

I have an Accordion in ExtJS and I want to add new Panels to it dynamically. The Panels need to be collapsed when they appear. The code that I have now will create the Panels, but the HTML in each panel won't show. var loadoutput = new Ext.Panel({ title: 'Log', renderTo: 'logout', layout: 'accordion', defaults: { bodyStyle: 'padding:10px', collapsed: true }, layoutConfig: { fill: true, animate: true } }); function logOutput(_title, _html) { temp = new Ext.Panel(); temp.title = _title; temp.html = _html; temp.collapsed = true; loadoutput.items.add(temp); loadoutput.doLayout(); } logOutput("Well, that was interesting", "Dude, what's up?
Hey hey hey
AAAAAH."); logOutput("Hello", "Dude, what's up?
Hey hey hey
AAAAAH."); logOutput("What?", "Dude, what's up?
Hey hey hey
AAAAAH."); logOutput("Cat", "Dude, what's up?
Hey hey hey
AAAAAH.");

以上就是How do I Dynamically adding a new Collapsed Panel to an Accordion in Ext?的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏