Expand my Community achievements bar.

Sling Modal Vs WCMUse

Avatar

Level 1

Both WCMUse and Sling Modal returns the value to the sightly. What is the difference between both of them? And when should one be used?

4 Replies

Avatar

Administrator

[It is not a answer]

Some reference post upfront coming into my mind:-

Link:- http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manage...

Link:- http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manage...

// Implementing wcmUse (deprecated now use WCMUsePojo) is different from Sling Models. You can use both from HTL (formerly known as sightly) (not together), but according to [1] you don't need to have WcmUse and the activate() method at all. I've found [2] which covers the proper usage of wcmUse pojos with Sightly.

 

[1] https://sling.apache.org/documentation/bundles/models.html

[2] http://blogs.adobe.com/experiencedelivers/experience-management/sightly-intro-part-4/

~kautuk



Kautuk Sahni

Avatar

Employee

Also WcmUse is bound to your component, while your sling-model can be reuse across your application.

Avatar

Level 10

When working with WCMUse - you need to use WCmUsePojo now.

As Feike says - this is the Java part of your component where you can define a bean you were you can populate values and display the values in the front end component. See: 

http://scottsdigitalcommunity.blogspot.ca/2016/07/creating-aem-html-template-language.html

A video is also included.