|
From: Matt R. <li...@ra...> - 2004-07-20 23:45:48
|
I've got it to work, but only after modifying the build.xml in CVS to
include *.ftl files. Here's my template:
<#import "/org/springframework/web/servlet/view/freemarker/spring.ftl"
as spring />
<@spring.bind "user.*"/>=20
<#if spring.status.error>
<div class=3D"error">
<#list spring.status.errorMessages as error>
${error}<br/>
</#list>
</div>
</#if>
Here's the bug from including *.ftl:
http://opensource.atlassian.com/projects/spring/browse/SPR-225
HTH,
Matt
> -----Original Message-----
> From: spr...@li...=20
> [mailto:spr...@li...]
> On Behalf Of J=E9r=F4me BERNARD
> Sent: Tuesday, July 20, 2004 4:17 PM
> To: spr...@li...
> Subject: [Springframework-developer] Problem with=20
> FreeMarkerFormView...
>=20
>=20
> I tried the following template:
> <#import "/spring.ftl" as spring />
> <html>
> <body>
> <@spring.bind path=3D"command.*">
> <#list status.errorMessages as error>
> Error code: ${error}<br/>
> </#list>
> </@spring.bind>
> </body>
>=20
> When the macro @spring.bind is called, I do have the=20
> following error: Error on line 62, column 9 in spring.ftl=20
> springBindStatusHelper.createBindStatus(path, escape) is=20
> undefined. It cannot be assigned to status The problematic=20
> instruction:
> ----------
> =3D=3D> assignment: =
status=3DspringBindStatusHelper.createBindStatus(path,=20
> escape) [on line 62, column 9 in spring.ftl]
> in user-directive spring.bind [on line 12, column 1 in user.ftl]
> ----------
>=20
> Java backtrace for programmers:
> ----------
> freemarker.core.InvalidReferenceException: Error on line 62,=20
> column 9 in=20
> spring.ftl
> springBindStatusHelper.createBindStatus(path, escape) is=20
> undefined. It cannot be assigned to status
> at freemarker.core.Assignment.accept(Assignment.java:112)
> at freemarker.core.Environment.visit(Environment.java:171)
> at freemarker.core.Macro$Context.runMacro(Macro.java:164)
> at freemarker.core.Environment.visit(Environment.java:470)
> [...]
>=20
>=20
> Have someone been able to use FreeMarkerFormView properly?
> Do I need to add something "special" in my configurer for FreeMarker?
>=20
> TIA,
> J=E9r=F4me.
>=20
>=20
> -------------------------------------------------------
> This SF.Net email is sponsored by BEA Weblogic Workshop
> FREE Java Enterprise J2EE developer tools!
> Get your free copy of BEA WebLogic Workshop 8.1 today.=20
http://ads.osdn.com/?ad_idG21&alloc_id=10040&op=CCk
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
|