PDA

View Full Version : Dynamic Panel Help



saied_hai2006
7 Aug 2009, 10:08 PM
Hi,
I have a requirement like to create dynamic panels, depend on number which i give..

Eg,
Im having 3 checkboxes of name Air, Car and Hotel . If i check Air, it needs to create a panel with title as Air, if i check Air and car and it needs to create two panels of title as Air and Car. If i check all three checkboxes, it needs to create three panels and the title as Air, Car and Hotel.

Is there anyone to help me to solve this problem, Thanks in advance

Animal
7 Aug 2009, 11:48 PM
Why would you need to create a Panel?

Why not just create a Checkbox?

And surely, you would use the Javascript "new" keyword to create new instances of any class you wanted???

saied_hai2006
8 Aug 2009, 12:31 AM
For instance,
If i check "Air" Checkbox need to create Air Panel with 2 checkboxes like "Singapore Airlines" and "Qantas"
If i check "Car" Checkbox need to create Car Panel with 2 checkboxes like "Car Rental" and "Car Transfer"
If i check "Hotel" Checkbox need to create Hotel Panel with 2 checkboxes like "Day use","Night Use" and "Cruise"

Animal
8 Aug 2009, 1:04 AM
Shouldn't these always be there, but just hidden? Then you show/hide them when the checkboxes are checked/unchecked.

Anyway, do you need all the "Panelness" of Panels? header, border, toolbars etc? If all you need is to show an extra container with 2 checkboxes in it, just use a Container.

saied_hai2006
8 Aug 2009, 1:53 AM
i guess i've not explained to u correctly.
1.How to remove panels dynamically without using hide
2.How to render a html text box as an item in ext js panel

Animal
8 Aug 2009, 2:29 AM
How about a screenshot?

I don't know exactly whatyou want.

When I enable/disable inputs depending on a checkbox, I hide/show Containers. If it needs enclosing in some way, I'll use a Fieldset and hide it and show it depending.

Forget "render". You do not render.