Skip to main content
Feb 6, 2017 1:33 PM UTC
Solved

data-sly-resource passing data to the another component

<sly data-sly-resource="${ x @ resourceType='/apps/xxxxxx/components'}" data-sly-unwrap></sly>

It works in the preview mode.when we go to edit  mode, the page hangs up.please help me in this.

And also tell me other ways to pass resource to another component.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Feike_Visser1
Feike_Visser1Accepted solution
Adobe Employee
Feb 6, 2017 6:31 PM UTC

you can use selectors for this. However this is not the intention of data-sly-resource.

Have a look if a template (data-sly-template) suits your requirement

4 replies

smacdonald2008
Level 10
Feb 6, 2017 2:15 PM UTC
Feike_Visser1
Adobe Employee
Feike_Visser1Adobe EmployeeAccepted solution
Adobe Employee
Feb 6, 2017 6:31 PM UTC

you can use selectors for this. However this is not the intention of data-sly-resource.

Have a look if a template (data-sly-template) suits your requirement

Translate
smacdonald2008
Level 10
Feb 6, 2017 8:01 PM UTC

Components should as much as possible get their values from Dialog or OSGi configurations. Passing values between components is not a great practice. 

Translate
Feb 7, 2017 12:23 PM UTC

can you give a good example for this?

Translate