Foren

Template Context Contributor of type THEME in Liferay 7

Juan José Fuentes, geändert vor 6 Jahren.

Template Context Contributor of type THEME in Liferay 7

New Member Beiträge: 7 Beitrittsdatum: 28.01.16 Neueste Beiträge
I'm testing Template Context Contributors. I've created one contributor only for themes just like this:

@Component(
        immediate = true,
        property = {"type=" + TemplateContextContributor.TYPE_THEME},
        service = TemplateContextContributor.class
)
public class ExtraTestTemplateContextContributor implements TemplateContextContributor {
@Override
    public void prepare(Map<string, object> contextObjects, HttpServletRequest request) {
       ...
       ...
       ...
    }
}
</string,>


It is executing, but an (abnormal in my opinion) number of times: more than 20 times per page reload. Is this the correct behavior, or should be executing just one time, as I expected?