PDA

View Full Version : Attach FormPanel to a Tab Panel item



supermonchi
18 Apr 2011, 5:26 AM
I want to create a Tab Panel consisting a series of forms. The contents of Tab 2 depends on the form values entered in Tab 1. For example, if a user select Food then Tab 2 should consist only questions relevant to Food.

Currently my Viewport is a Tab Panel with FormPanels as its items. I manage to get this working with the update() function attached to a onChange listener but it only works if the content is plain text.

How can I make a switch call to the appropriate FormPanel and update or replace what is currently there?

I found the setCard() function in Ext.Tab. Is this the right way to go about it?

I hope this is clear.
Thanks in advance.