I developed a component to render a slick-carousel and therefore I declared some parameters (s. screenshot) in a ParametersInfo class (interface). I wrote a freemarker-template an everything worked.
After that I added some more parameters (here e.g. carouselControls) in cms they are rendered correctly with the default values- as you can see in the screenshot.
But in the requestparameters for the Freemarker-template, they result in a null value. I debugged my component-class and could confirm, that the getters of the info-class are null.
This i how my component looks like:
package org.lienas.components;
import org.hippoecm.hst.core.component.HstRequest;
import org.hippoecm.hst.core.component.HstResponse;
import org.hippoecm.hst.core.parameters.ParametersInfo;
import org.lienas.components.info.OsdeNewsCarouselComponentInfo;
import org.onehippo.cms7.essentials.components.EssentialsListComponent;
import org.onehippo.cms7.essentials.components.utils.ComponentsUtils;
@ParametersInfo(type = OsdeNewsCarouselComponentInfo.class)
public class OsdeNewsCarouselComponent extends EssentialsListComponent {
@Override
public void doBeforeRender(HstRequest request, HstResponse response) {
super.doBeforeRender(request, response);
final OsdeNewsCarouselComponentInfo parametersInfo = this.getComponentParametersInfo(request);
request.setAttribute("cparam", parametersInfo);
ComponentsUtils.addCurrentDateStrings(request);
}
}
An this is a snippet of the interface
public interface OsdeNewsCarouselComponentInfo extends EssentialsListComponentInfo {
@Parameter(
name = "slidesToShow",
required = true,
defaultValue = "4")
Integer getSlidesToShow();
@Parameter(
name = "autoplay",
required = true,
defaultValue = "true")
Boolean isAutoPlay(); // works fine :-)
@Parameter(
name = "carouselControls",
required = true,
defaultValue = "true"
)
Boolean showCarouselControls(); // added and gets null !!!
@Parameter(
name = "carouselDots",
required = true,
defaultValue = "true"
)
Boolean showCarouselDots(); // added and gets null !!!ll
// some more params
}
What is going wrong here ?
PS: I certainly rebuild the application.