Announcement Announcement Module
Collapse

Spring Modules forum decommissioned in favor of Spring Extensions

As the Spring Modules project has been replaced by the Spring Extensions (http://www.springsource.org/extensions) project, this forum has been decommissioned in favour of Spring Extensions one at:
http://forum.springsource.org/forumdisplay.php?f=44

Please see the Spring Extensions home page for a complete list of current projects in Java, .NET and ActionScript. You can also propose one if you want.

Cheers,
Costin Leau
SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
http://twitter.com/costinl
See more
See less
Valang client-side / Freemarker demands a body! Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Valang client-side / Freemarker demands a body!

    I have valang working, including client-side validation in freemarker. I'm using the new Spring 2.0 freemarker/taglibs integration.

    The problem is, the validate tag expects a body, and if it doesn't get a body, it chucks a parse error.

    I reference the valang js tags like so:

    HTML Code:
    <#assign valang=JspTaglibs["http://www.springmodules.org/tags/valang"]>
    if I do this:

    HTML Code:
    <@valang.validate commandName="command" />
    I get this:
    freemarker.template.TemplateModelException: javax.servlet.jsp.JspException: Could not parse valang
    at freemarker.ext.jsp.TagTransformModel$TagWriter.aft erBody(TagTransformModel.java:507)
    caused by this:

    org.springmodules.validation.valang.parser.ParseEx ception: Encountered "<EOF>" at line 1, column 0.
    Was expecting:
    "{" ...
    If I do this:
    HTML Code:
    		<@valang.validate commandName="command">
    		{ stupid : ? has text : 'this is stupid' }
    		</@valang.validate>
    it works fine (except I have to define a javascript-only rule that I do not want)

    I did not have this problem in JSP.

    Help? Anyone?
Working...
X