2 Replies Latest reply on Nov 8, 2012 2:45 AM by Veena_07

    Foundation Form Component's start and end component

    Veena_07 Level 3

      Hi guys

       

            I want to know how the form components START and END component are linked together.

       

      Thanks

       

      Veena

        • 1. Re: Foundation Form Component's start and end component
          kasq Level 3

          HI Vena,

           

          Both of them are created by the java files used for From component. Please check the "/libs/foundation/src/impl/src/main/java/com/day/cq/wcm/foundation/forms/FormsConstants.j ava" file

          where you will find path is hard coded:

           

          /** The prefix for all form related resource types.*/

          public final static String RT_FORM_PREFIX = "foundation/components/form/";

           

          /** The resource type for a form begin. */

          public final static String RT_FORM_BEGIN = RT_FORM_PREFIX + "start";

           

          /** The resource type for a form end. */

          public final static String RT_FORM_END = RT_FORM_PREFIX + "end";

           

          Those constants defined in this file are used in other java files related to Form component, for example inside:

           

          /libs/foundation/src/impl/src/main/java/com/day/cq/wcm/foundation/form s/FormsHelper.java

          /libs/foundation/src/impl/src/main/java/com/day/cq/wcm/foundation/form s/impl/FormParagraphPostProcessor.java

           

          So in case of Forms there is used a lot of files which finally generate the form and Start and End parts of the form.

           

          If you want to customize it and put form component inside your /apps/project/components path you need to write your custom class with the path to your custom Form Component and import these class in your custom Form Component.

           

          I hope that this helps you somehow to understand a relation.

           

          Regards,

          kasq



           


          1 person found this helpful
          • 2. Re: Foundation Form Component's start and end component
            Veena_07 Level 3

            Thanks a lot Kasq

             

                      I got the flow of the structure.BUT I HAVE ONE MORE DOUBT.  The fixStructure() method of FormParagraphPostProcessor.java class is the one which calls the end and start. But my doubt is how this class is called so that it will listen to event change in the CQ page for a form component???

             

             

            Regards

             

            Veena