Solved

problem with Collapsable Header

Posted on 2011-03-16
13
340 Views
Last Modified: 2012-05-11
Hi Expert,
In my code i am using option called [Command Description Suggestion/Correction]. When i click that , it opens TextArea with two buttons. when i click again, TextArea with two buttons closes.
Here is the issue:
----------------------
Please see attached screen shots.
expand one CollapsableHeader(cmdName2)--> expand and close [Command Description Suggestion/Correction]-->now collapse the CollapsableHeader(cmdName2)-->again  expand(cmdName2)-->i see singleline with 2 buttons in the bottom
Actually, when i expand CollapsableHeader(cmdName2), TextArea with two buttons should not visible. For the first time it is ok. problem occurs when i open and close  [Command Description Suggestion/Correction]

Could you plse let me know where i am wrong and where i need to change.
Please find my attached component code.

img1.bmp
img2.bmp
img3.bmp
CommandHelpComp.txt
0
Comment
Question by:Alpita
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 6
13 Comments
 
LVL 29

Expert Comment

by:dgofman
ID: 35152841
I will suggest remove your onSuggestionClick function and use

this.currentState = "expand";

in your code.

Now add these lines:

      <s:states>
            <s:State name="default"/>
            <s:State name="expand"/>
      </s:states>

And definefor all "expand" components an attribute

includeIn="expand"


When you click the next time you need to change currentState to "default"

or you can use OR condition:

currentState = (currentState == "expand" ? "default" : "expand");
0
 

Author Comment

by:Alpita
ID: 35153455
I changed like this as per your response.
I Commented the code in the onSuggestionClick ().
But Commented code is needed.
Could you plse let me know, what else i need to change?
changedCode.txt
0
 
LVL 29

Expert Comment

by:dgofman
ID: 35153648
I cannot run your sample file.
But you need remove all

includeInLayout="false"

and use includeIn + state instead

create a simple button and check how your code will work on calling onSuggestionClick function
 
<mx:Button click="onSuggestionClick(event)"/>
0
Defend Your Organization from The Greatest Threats

Looking to fill the gaps in your security? Bring together information from the network, endpoint and threat intelligence feeds to really see what's happening in your organization. Join the WatchGuardians in their adventures fighting cyber crime!

 

Author Comment

by:Alpita
ID: 35156989
I ran it. But when i click , TextArea with two buttons are not showing.
I mean currentState statement is not executing properly. Nothing is showing when i click.
Can i have your email id, so that i can attach my files?

Regards,
Alpita
0
 
LVL 29

Expert Comment

by:dgofman
ID: 35158198
Yes, please send me your project I will able to help you.
0
 

Author Comment

by:Alpita
ID: 35158736
Please , could you provide your emailId?
0
 
LVL 29

Expert Comment

by:dgofman
ID: 35158785
david_gofman@yahoo.com
0
 

Author Comment

by:Alpita
ID: 35160254
I sent all my files .
0
 

Author Comment

by:Alpita
ID: 35162110
Hello expert,

I found work around solution. Thanks for your help.

Regards,
Alpita
0
 
LVL 29

Expert Comment

by:dgofman
ID: 35162113
are you using state manager?
0
 

Author Comment

by:Alpita
ID: 35162127
No. I did not use state manager. In onResult(), i made the <mx:VBox/> containing textArea and button visible = false;includeInLayout = false.
I have no idea about states. Need to go through material.

Regards,
Alpita
0
 
LVL 29

Accepted Solution

by:
dgofman earned 500 total points
ID: 35162304
0
 

Author Closing Comment

by:Alpita
ID: 35162393
Thanks
0

Featured Post

How to Defend Against the WCry Ransomware Attack

On May 12, 2017, an extremely virulent ransomware variant named WCry 2.0 began to infect organizations. Within several hours, over 75,000 victims were reported in 90+ countries. Learn more from our research team about this threat & how to protect your organization!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
enable compression/gzip on oracle XML DB HTTP Server 3 588
Highlight/Sticky Note/Bookmark page - SWF file 9 350
html into FLEX 3 280
doubt future Flex 4 449
First things first - Preparation We need all the part for this install and it's much nicer to have them all on hand when you need them so here's what's required. Download Eclipse 3.5 32 bit (I like the Classic flavour) from here. (http://www.e…
The following article is comprised of the pearls we have garnered deploying virtualization solutions since Virtual Server 2005 and subsequent 2008 RTM+ Hyper-V in standalone and clustered environments.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question