Extend local use-class in Sightly | Community
Skip to main content
PeterFlorian
New Participant
October 16, 2015
Solved

Extend local use-class in Sightly

  • October 16, 2015
  • 11 replies
  • 2898 views

Hi,

in Sightly I use local classes for my components. This classes should extend an abstract class. But the abstract class can’t be found in the classpath. It does not even get compiled.

In fact I have a file structure like this:

/apps/myproject/components
                AbstractComponent.java
/apps/myproject/components/component1
                component1.html
                Component1.java

component1.html  contains the Sightly directive:

    <sly data-sly-use.bean="Component1">

Component1.java inherits from AbstractComponent:

    package apps.myproject.components.component1;     import  apps.myproject.components.AbstractComponent;     public class Component1 extends AbstractComponent {     …     }

(I don't know where the '5.' comes from. I didn't enter this - It seems to be a feature of this forum?)

What can I do to compile the AbstractComponent so it can be found in the classpath?

Thank you

                Peter

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

Hi Peter,

Sightly is open source (via Sling) and we welcome improvements. There are several levels in Sling (from Sightly down to the actual compiler  - Eclipse JDT) where the referenced classes can be looked up and compiled. The goal was to keep things as lightweight as possible with Sightly.

Thanks,
Vlad
 

11 replies

Vlad_Accepted solution
New Participant
October 16, 2015

Hi Peter,

Sightly is open source (via Sling) and we welcome improvements. There are several levels in Sling (from Sightly down to the actual compiler  - Eclipse JDT) where the referenced classes can be looked up and compiled. The goal was to keep things as lightweight as possible with Sightly.

Thanks,
Vlad