Link to home
Start Free TrialLog in
Avatar of Alpita
Alpita

asked on

problem with Collapsable Header

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
Avatar of dgofman
dgofman
Flag of United States of America image

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");
Avatar of Alpita
Alpita

ASKER

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
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)"/>
Avatar of Alpita

ASKER

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
Yes, please send me your project I will able to help you.
Avatar of Alpita

ASKER

Please , could you provide your emailId?
david_gofman@yahoo.com
Avatar of Alpita

ASKER

I sent all my files .
Avatar of Alpita

ASKER

Hello expert,

I found work around solution. Thanks for your help.

Regards,
Alpita
are you using state manager?
Avatar of Alpita

ASKER

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
ASKER CERTIFIED SOLUTION
Avatar of dgofman
dgofman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Alpita

ASKER

Thanks