How/when does CQ invoke init.jsp scripts? | Community
Skip to main content
LinearGradient
October 16, 2015
Solved

How/when does CQ invoke init.jsp scripts?

  • October 16, 2015
  • 6 replies
  • 2701 views

For example, the text component, has an init.jsp file. However I don't see it being included in any other JSP file.

Its super resource type, /libs/foundation/components/form/defaults/field, doesn't user it either.

So what, how and when does CQ invoke this script?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by joerghoh

Hi,

This init selector of form components is explictly called by the ootb form in the rendering process, so it's not up to you. This init.jsp is specific to the form components and is not used by other components. I am not a specialist in the the form components ...

6 replies

joerghoh
Adobe Employee
Adobe Employee
October 16, 2015

Which text component are you referring to?

LinearGradient
October 16, 2015

Jorg,

I am referring to /libs/foundation/components/form/text. A bunch of other components also have init.jsp scripts that are not being included in a larger, parent script.

I wonder how are they getting invoked?

Another question I had is how does CQ automatically add an end (/libs/foundation/components/form/end) component to pair with a start (/libs/foundation/components/form/start) component, when the start component is dropped onto the page?

Thanks.

LinearGradient
October 16, 2015

Hi Jorg,

Any ideas about this?

Thanks in advance.

LinearGradient
October 16, 2015

Hi Jorg,

Could you please elaborate? 

  • Which operations (in Touch UI or anywhere else) do invoke the init selector in general, and in this particular case, for form components?
  • In general when developing custom components, what should be put inside the init.jsp files?

​Thanks.

joerghoh
Adobe Employee
Adobe Employee
October 16, 2015

The init.jsp files are called in the FormsHelper class, which includes the form elements with the selector "init". So that's a feature of the foundation form components.

joerghoh
Adobe Employee
joerghohAdobe EmployeeAccepted solution
Adobe Employee
October 16, 2015

Hi,

This init selector of form components is explictly called by the ootb form in the rendering process, so it's not up to you. This init.jsp is specific to the form components and is not used by other components. I am not a specialist in the the form components ...