Quantcast
Channel: Adobe Community : Popular Discussions - CQ5 (read only)
Viewing all articles
Browse latest Browse all 12476

Is there way to dyanmically set component proeprties?

$
0
0

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?


Viewing all articles
Browse latest Browse all 12476

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>