Skip to main content
New Participant
December 5, 2016

Sling Modal Vs WCMUse

  • December 5, 2016
  • 4 replies
  • 3449 views

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?

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

4 replies

rohitkhattar
New Participant
May 8, 2017

Refer the below page from Sling site that provides a comparison for picking the best Use Provider

https://sling.apache.org/documentation/bundles/scripting/scripting-htl.html#picking-the-best-use-provider-for-a-project

 

Feike_Visser1
Employee
May 9, 2017

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

smacdonald2008
New Participant
May 9, 2017

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. 

kautuk_sahni
Employee
December 5, 2016

[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-manager.topic.html/forum__p4z7-hi_team_is_itpo.html

Link:- http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manager.topic.html/forum__rafi-hi_team_i_would.html

// 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