3 Replies Latest reply on Jun 2, 2010 5:30 AM by Sangeeta Kalyani

    Panel with dynamic form


      I need to create panels with dynamic forms. Why does my application will have various forms and if I have to create a lot of forms it will take too long to complete my application.
      Can anyone help me?

        • 1. Re: Panel with dynamic form
          RonnieCR7 Level 1

          Hi Ricardo,

          Just create a form with different form items and add those to the panel as child. You can make your panel dynamic based on what ever parameter that you use, by limiting the form items that are being added. If you can explain a little more of your problem it would be easier for everyone to suggest their ideas.

          • 2. Re: Panel with dynamic form
            RicardoFressa Level 1

            So my idea is as follows ...
            I need to create various forms, actually I wanted to create a scheme where the forms to adopt the characteristics defined by me.

            <s:Panel width="350">
            <mxml:CustomForm dataConfig="{dataConfig1}" width="100%" />
            </ S: Panel>

            Yo I'm adding the inputbox, LABES and buttons on the panel through the

            dataConfig1 = new ArrayCollection ([
            (Label: 'Name', message: 'Invalid name', validateType 'noblank', id: 'name', text: 'Pedro Claudio', required: true),
            (Label: 'Mail', message: 'Invalid Email' validateType: 'email', id: 'email', text:'', required: true)

            I wonder if this is the easiest way to create the forms?


            How does this business of the panels child?

            • 3. Re: Panel with dynamic form
              Sangeeta Kalyani Level 1

              Hi Recardo


              Define your CustomForm in such a way that it adds the child components to the parent based on the control/component type (i.e Label, TextInput, TextArea, Combobox, etc). For this use a switch-case in the createchildern() method of your CustomForm. Do whatever functionality you want to apply based on the control type. Also modify your dataConfig to have the control type.



              Sangeeta Kalyani