In one of my component I am making some external service calls and I would like to populate the component's properties with the data received from the service call. How can I do it?
I tried using currentNode.setProperty("mypropname", "myservicedata") but it did not work.
Also when including the text components in the script is there a way to populate its text property of text component with some default value?
mycomponent.jsp
-----------------------
. . .
<cq:include path="text1" resourceType="foundation/components/text"/> <%-- How to pre-populate this component with value say "My Text 1" --%>
<cq:include path="text2" resourceType="foundation/components/text"/><%-- How to pre-populate this component with value say "Additional Text 2" --%>
. . .
Has anyone done something like this?