Problem adding Java component bean to AEM 6.3 component in Eclipse
Hi All,
I am trying to add a Java component bean to an AEM 6.3 component in Eclipse.
I have added the following Java class to the "core" section in the Eclipse project :-
package test;
import com.adobe.cq.sightly.WCMUsePojo;
public class TestComponentBean extends WCMUsePojo
{
@Override
public void activate() throws Exception
{
}
public String getContent()
{
return "TEST CONTENT";
}
}
I have added the following HTML to the page template in the "ui.apps" section in the Eclipse project :-
<div data-sly-use.componentBean="${'test.TestComponentBean'}">
<p> ${componentBean.content} </p>
</div>
The project appears to build and deploy to the AEM 6.3 server correctly.
When I view the page template, I am seeing the following error in the browser in the page source :-
org.apache.sling.scripting.sightly.SightlyException: Cannot find a file corresponding to class test.TestComponentBean in the repository.
Please can you advise me why the class test.TestComponentBean cannot be found and how can I resolve this problem?
Thank you for your time.
