扩展弹簧窗体标签库属性 [英] extending spring form tag library attributes
问题描述
我在我正在开发的Spring MVC应用程序中使用Spring的表单标记库。我工作的公司实施了一些公司范围的政策,基于某些标签的自定义属性的定义。例如,默认情况下(尽管包含一个标准的JavaScript文件),所有标签都会自动将其值转换为大写。为了禁用这个功能,可以通过以下方式定义自己的标签:
< input type =text uppercase =false/>
问题在于将这些自定义属性添加到spring:form标签会导致运行时出错。
org.apache.jasper.JasperException:/WEB-INF/jsp/reportCriteria.jsp (45,5)根据TLD标签输入的属性大写无效
我的问题是:是否有任何方式来扩展TLD以允许这些属性,或者是否有任何其他方式将这些自定义属性添加到这些spring:form标签?
它在Spring 3.0中实现( SPR-5931 )。
I'm using Spring's form tag library in a Spring MVC application that I am developing. The company I am working for has implemented some company-wide policies based on the definition of custom attributes for certain tags. For instance, by default (though the inclusion of a standard javascript file) all tags have their values automatically converted to upper case. In order to disable this one would define their tag with a custom attribute in the following way:
<input type="text" uppercase="false" />
The problem is that the addition of these custom attributes to a spring:form tag causes an error at runtime. I've pasted the error below.
org.apache.jasper.JasperException: /WEB-INF/jsp/reportCriteria.jsp(45,5) Attribute uppercase invalid for tag input according to TLD
My question is: is there any way to extend the TLD to allow for these attributes, or is there any other way add these custom attributes to these spring:form tags?
It's implemented in Spring 3.0 (SPR-5931).
这篇关于扩展弹簧窗体标签库属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!