Solved

problem with Collapsable Header

Posted on 2011-03-16
13
336 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
  • 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
 

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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

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…
A Short Story about the Best File Recovery Software – Acronis True Image 2017
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

706 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now