Announcement Announcement Module
Collapse
No announcement yet.
Boolean attribute generates undefined "validationMessageCode" attribute for web mvc Page Title Module
Move Remove Collapse
This topic is closed
X
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Boolean attribute generates undefined "validationMessageCode" attribute for web mvc

    When a jpa entity with a Boolean has a web mvc scaffold generated then the field:checkbox jspx file has a "validationMessageCode" attribute that is undefined

    The jspx
    Code:
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <div xmlns:c="http://java.sun.com/jsp/jstl/core"
    	xmlns:field="urn:jsptagdir:/WEB-INF/tags/form/fields"
    	xmlns:form="urn:jsptagdir:/WEB-INF/tags/form"
    	xmlns:jsp="http://java.sun.com/JSP/Page"
    	xmlns:spring="http://www.springframework.org/tags" version="2.0">
    	<jsp:directive.page contentType="text/html;charset=UTF-8" />
    	<jsp:output omit-xml-declaration="yes" />
    	<form:create id="fc_com_kn_core_domain_KnEmailSource"
    		modelAttribute="knEmailSource" path="/email"
    		render="${empty dependencies}" z="dTLrpRuDVRJ5mrhIoIgQCZ2vM88=">		
    
          <field:checkbox field="emailAllowed"
    	id="c_com_kn_core_domain_KnEmailSource_emailAllowed"
    	validationMessageCode="field_invalid_email"
    	z="wTN+Jq4iS1yreKGSzQx31kMngEI=" />
    ...
    The Java attribute:
    Code:
    @RooJavaBean
    @RooToString
    @Buildable
    @RooJpaActiveRecord
    public class KnEmailAccount {    
         private Boolean emailAllowed;
    }
    The runtime error...

    Code:
    Nov 29, 2011 11:27:46 PM org.apache.catalina.core.ApplicationDispatcher invoke
    SEVERE: Servlet.service() for servlet jsp threw exception
    org.apache.jasper.JasperException: /WEB-INF/views/email/create.jspx(10,182) Attribute validationMessageCode invalid for tag checkbox according to TLD
    	at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
    	at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
    	at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:236)
    	at org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:1235)
    	at org.apache
    Of course, removing validationMessageCode="field_invalid_email" is the workaround

    I figure this is a bug, I'll open a JIRA issue if somebody can confirm it.

    thanks,

    Mark

  • #2
    Logged as ROO-2957; please continue the discussion there.

    Comment

    Working...
    X