I have an accordion region containing two sub regions, "header" and "details". By default header is displayed. I want to display "details" when it is an existing record (header has data) and display "header" when it is a new record. The accordion is displayed in a Content Loader. What event do I need to use to handle this.

asked 09 Feb, 07:04

Ray's gravatar image

accept rate: 11%

This can be done by a conditional dynamic action. For example if both your header and details are both grids you can perform the following:

First define a STATIC_ID for the regions if not already done. (e.g. HEADER and DETAILS)

Important: The Event for the dynamic action must not be Page Load!
Because data is loaded via Ajax after page load.

(Ext.getCmp('HEADER').getStore().count() > 0)

FOEX Utils - FOEX Actions - Expand

True action expand DETAILS
False action expand HEADER

This example is based on a button click: alt text  
alt text

Alternatively if your "header" is a form you would simply change the javascript expression to check the value of the primary key page item for the form.


answered 09 Feb, 10:06

FOEX-SUPPORT's gravatar image

accept rate: 32%

edited 10 Feb, 04:18

Thanks for this. My page with HEADER and DETAILS is loaded with Content Loader. I need to do it somehow after the data is loaded, I tried events like "form load succes" etc, but that does not work. It works from a button, but that is not a feasible solution. Is it at all possible?

(10 Feb, 08:02) Ray Ray's gravatar image

We need to understand your setup, so please create a test case and we will assist you with the solution.

(10 Feb, 10:05) FOEX-SUPPORT FOEX-SUPPORT's gravatar image
Your answer
toggle preview

Follow this question

By Email:

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



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



Asked: 09 Feb, 07:04

Seen: 350 times

Last updated: 10 Feb, 10:05

FOEX Links