We are having a problem understanding how the actionURL in the FTL relates to our component. No matter what we try we cannot get the doAction mothod to fire. We have a doBeforeRender method that does fire when the page gets rendered.
Here is the snippet from our ftl file.
<form id="quoteForm" name="Insurance_form" method="post" action="${actionLink}" enctype="application/x-www-form-urlencoded">
Here is the component code.
@ParametersInfo(type = LandingPageComponentInfo.class)
public class LandingPageComponent extends BaseHstComponent {
@Override
public void doBeforeRender(HstRequest request, HstResponse response) {
super.doBeforeRender(request, response);
LandingPageComponentInfo info = getComponentParametersInfo(request);
HstRequestContext ctx = request.getRequestContext();
HippoBean root = ctx.getSiteContentBaseBean();
PageHeaderBanner headerBanner = root.getBean(info.getPageBanner(), PageHeaderBanner.class);
PageStepsBanner stepsBanner = root.getBean(info.getStepsBanner(), PageStepsBanner.class);
Promo promo1 = root.getBean(info.getPromo1(), Promo.class);
Promo promo2 = root.getBean(info.getPromo2(), Promo.class);
Disclaimer pageLinks = root.getBean(info.getPageLinks(), Disclaimer.class);
Disclaimer disclaimer = root.getBean(info.getDisclaimer(), Disclaimer.class);
Disclaimer formNumber = root.getBean(info.getFormNumber(), Disclaimer.class);
PageLightBox learnMoreLightBox = root.getBean(info.getLearnMoreLightBox(), PageLightBox.class);
PageLightBox learnAboutLightBox = root.getBean(info.getLearnAboutLightBox(), PageLightBox.class);
request.setAttribute("headerBanner", headerBanner);
request.setAttribute("stepsBanner", stepsBanner);
request.setAttribute("promo1", promo1);
request.setAttribute("promo2", promo2);
request.setAttribute("pageLinks", pageLinks);
request.setAttribute("disclaimer", disclaimer);
request.setAttribute("formNumber", formNumber);
request.setAttribute("learnMoreLightBox", learnMoreLightBox);
request.setAttribute("learnAboutLightBox", learnAboutLightBox);
}
@Override
public void doAction(HstRequest arg0, HstResponse arg1) throws HstComponentException {
System.out.println("Hey you made it!!");
}