Spring Roo
  1. Spring Roo
  2. ROO-476

Scaffold broken if we remove client-side validation on entities with more than one word (e.g. FooBar)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.0.RC4
    • Fix Version/s: 1.0.0.RELEASE
    • Component/s: WEB MVC
    • Labels:
      None

      Description

      entity --class ~.domain.FooBar
      field date --fieldName today --type java.util.Date --class ~.domain.FooBar
      controller scaffold --class ~.web.FooBarController

      After remove scripts from create form , and submit with invalid date pattern then you would see below exceptions:

      java.lang.IllegalStateException: Neither BindingResult nor plain target object for bean name 'foobar' available as request attribute
      at org.springframework.web.servlet.support.BindStatus.<init>(BindStatus.java:141)
      at org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag.getBindStatus(AbstractDataBoundFormElementTag.java:175)
      at org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag.getPropertyPath(AbstractDataBoundFormElementTag.java:195)
      at org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag.getName(AbstractDataBoundFormElementTag.java:161)
      at org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag.writeDefaultAttributes(AbstractDataBoundFormElementTag.java:124)
      at org.springframework.web.servlet.tags.form.AbstractHtmlElementTag.writeDefaultAttributes(AbstractHtmlElementTag.java:409)
      at org.springframework.web.servlet.tags.form.InputTag.writeTagContent(InputTag.java:140)
      at org.springframework.web.servlet.tags.form.AbstractFormTag.doStartTagInternal(AbstractFormTag.java:91)
      at org.springframework.web.servlet.tags.RequestContextAwareTag.doStartTag(RequestContextAwareTag.java:78)
      ...
      IO Error executing tag: JSPException including path '/WEB-INF/views/foobar/create.jspx'.
      org.apache.tiles.util.TilesIOException: JSPException including path '/WEB-INF/views/foobar/create.jspx'.
      at org.apache.tiles.servlet.context.ServletUtil.wrapServletException(ServletUtil.java:232)
      at org.apache.tiles.jsp.context.JspTilesRequestContext.include(JspTilesRequestContext.java:105)
      at org.apache.tiles.jsp.context.JspTilesRequestContext.dispatch(JspTilesRequestContext.java:96)
      at org.apache.tiles.renderer.impl.UntypedAttributeRenderer.write(UntypedAttributeRenderer.java:61)
      at org.apache.tiles.renderer.impl.AbstractBaseAttributeRenderer.render(AbstractBaseAttributeRenderer.java:103)
      at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:669)
      at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:337)
      at org.apache.tiles.jsp.taglib.InsertAttributeTag.render(InsertAttributeTag.java:234)
      at org.apache.tiles.jsp.taglib.InsertAttributeTag.render(InsertAttributeTag.java:211)
      at org.apache.tiles.jsp.taglib.RenderTag.doEndTag(RenderTag.java:220)
      ....

      Note: Create form will work as expected after change modelAttribute in jsp and controller to 'fooBar'(not foobar).

        Activity

        Hide
        Stefan Schmidt added a comment -

        Hi Sid,

        I fixed the issue with rev 533. It would be great if you could try it from Roo trunk.

        Cheers,
        Stefan

        Show
        Stefan Schmidt added a comment - Hi Sid, I fixed the issue with rev 533. It would be great if you could try it from Roo trunk. Cheers, Stefan
        Hide
        Sid added a comment -

        Hi Stefan,

        Great, yes is working like butter
        Thanks for fast fix.

        Cheers,
        Sid

        Show
        Sid added a comment - Hi Stefan, Great, yes is working like butter Thanks for fast fix. Cheers, Sid

          People

          • Assignee:
            Stefan Schmidt
            Reporter:
            Sid
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: