Hi Formspider Team,

I am trying to add an accordion to an accordionpanel at application startup using api_accordionpanel.addaccordion. I see that the accordion is created (i can see the accordion header and correct title, and i can set the accordion to expanded, so that part is working).

The problem is that it does not show the panel inside the accordion. The accordion is empty. I can see in the debugger these error messages:

ERROR :  BDF_ResponseDispatcher.executeActions AddAccordion Cannot read property 'dom' of undefined undefined
ERROR :  BDF_ResponseDispatcher.executeActions SetAccordion Cannot call method 'get' of undefined undefined
ERROR :  BDF_ResponseDispatcher.executeActions AddAccordion Cannot read property 'dom' of undefined undefined
ERROR :  BDF_ResponseDispatcher.executeActions SetAccordion Cannot call method 'get' of undefined undefined
ERROR :  BDF_ResponseDispatcher.executeActions SetAccordion Cannot call method 'get' of undefined undefined

The procedure i use to add the accordions and the panels works fine when i call it after the application loaded (via a test button).

Am i hitting a bug? Or is there a workaround, like maybe calling it at a later point in time when loading the application. I call it now on the application Post Open event. Any idea how to solve this?

Thanks, Michiel

asked 08 May '13, 14:47

Michiel%20A's gravatar image

Michiel A
5161541
accept rate: 13%


Hi Michiel,

This seems like a bug. Regarding the error messages, I guess you are adding 3 accordions to the accordionpanel. I'm able to reproduce some part of your problem, get the ERROR : BDF_ResponseDispatcher.executeActions SetAccordion Cannot call method 'get' of undefined undefined error message and have an an empty accordion when I added an accordion to an accordionpanel which is not displayed on the screen yet.

However, I can't still get the ERROR : BDF_ResponseDispatcher.executeActions AddAccordion Cannot read property 'dom' of undefined undefined error message, I guess this error occurs during your first two addAccordion API calls, therefore it can br related to the panels added into the new accordions as well as your accordion panel definition.

Can you post the code used to add accordions and XMLs of your accordionPanel and the other panels included to the new accordions? Could it be possible for you to prepare a sample application to reproduce both errors?

I guess you are dynamically adding your accordionpanel to the screen in run time. As a workaround, you can try to include your accordionpanel to the mainFrame in design time (into a hidden row having 0 as height). Then, in the postOpen event, you can remove it from the mainFrame using api_frame.removePanel API and call your procedure to add the accordions.

Regards,
Ibrahim

link

answered 09 May '13, 04:10

Ibrahim%20Sandalli's gravatar image

Ibrahim Sand... ♦♦
1.5k5
accept rate: 25%

Hi Ibrahim,

I will try to build a small app showing the issue. The feature i try to build is needed for my app startpage. On the start page, there are three accordions (one 100 width on top, and two below next to eachother). The users can configure wich content is diplayed in these accordions (kind of like having a startpage with portlets, where you can choose your own set of portlets to be displayed).

So, on startup, i check the user settings and add the portlets to the different accordions. The accordion panels exist , i just add accordions with the different panels to them on startup. So, i cannot create a start panel on design time, i need it to be dynamic. There will be a lot of different 'portlets' and i dont want to initialize them all on startup (or do i misunderstand your workaround ?)

I will mail you the example app in a while.

Thanks, Michiel

(09 May '13, 11:54) Michiel A

Hi Michiel,

My workaround suggestion relies on including your three accordion panels to the mainFrame at design time in hidden rows. On the postOpen event, you have to remove these accordion panels from the mainFrame and include them to their original positions (your current design time positions) and then add the necessary accordions depending user configuration. Since the error seems to be occurred during accordion panel initialization, I guess including them to the mainFrame in design time can prevent the problem.

In any case, we have to fix this problem, we are waiting for the example app :)

Best,
Ibrahim

(09 May '13, 12:32) Ibrahim Sand... ♦♦

OK, i see what you mean. I will try that. Working on the sample app now..

(09 May '13, 13:10) Michiel A

Hi Ibrahim,

I tested the workaround. It does put the accordion panel content in the accordion, but the accordion is not expanded, even though i call api_accordionpanel.expandaccordion to expand it. (api_accordionpanel.getaccordionstate at that moment returns "Expanded" but it displays colapsed). So it seems that moving the accordionpanel from mainFrame to the target panel collapses the accordions.

So, sadly not a complete workaround.

Best, Michiel

(09 May '13, 14:44) Michiel A

Hi Ibrahim,

I sent a test app that reproduces the issues last evening to formspider at gmail account. If you figure out a workaround or solution, please let me know.

Thanks, Michiel

(10 May '13, 02:38) Michiel A

Hi Michiel,

Many thanks for the test app. We are working on the problem.

Best,
Ibrahim

(10 May '13, 04:02) Ibrahim Sand... ♦♦
showing 5 of 6 show 1 more comments
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×1
×1

Asked: 08 May '13, 14:47

Seen: 1,066 times

Last updated: 10 May '13, 04:49

Related questions


© Copyright Gerger 2017