ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Robinson <jus...@venturenet.co.za>
Subject FreeMarker requestAttribute issue
Date Wed, 04 May 2011 09:55:02 GMT
surveyWrapper?has_content always returns false no matter that the
debug shows that it's not null when it's set.
Have tried setting it as a session attribute, with no effect.
Am really stumped on this one no idea what to try....Any ideas?


the ftl:
<div class="screenlet">
    <div class="screenlet-body">
        <#-- Render the survey -->
        <#if surveyWrapper?has_content>
            <form method="post" enctype="multipart/form-data"
action="<@ofbizUrl>profilesurvey/profilesurvey</@ofbizUrl>"
style="margin: 0;">
              ${surveyWrapper.render()}
            </form>
        <#else>
            <h1>Survey Failed</h1>
            <p>surveyWrapper?has_content returned false</p>
        </#if>
    </div>
</div>

code that sets the surveyWrapper:
 // set up a surveyAction and surveyWrapper, then redirect to survey
ProductStoreSurveyWrapper wrapper = new
ProductStoreSurveyWrapper(surveys.get(0), cart.getOrderPartyId(),
UtilHttp.getParameterMap(request));
Debug.log("wrapper: "+(wrapper!=null? "not null":"null"), MODULE);
request.setAttribute("surveyWrapper", wrapper);
request.getSession().setAttribute("surveyWrapper", wrapper);
request.setAttribute("surveyAction", "addOrderItemSurvey")

Regards,
Justin
Venture-Net Research & Development

Mime
View raw message