Scarab commit: svn commit: r10849 - branches/release/0.22/src: conf/conf java/org/tigris/scarab/util webapp/WEB-INF/templates/macros

Johannes Höchstädter <[email protected]>
Newsgroups gmane.comp.java.scarab.cvs
Message-ID <[email protected]>
Author: jhoech
Date: 2009-09-16 06:50:17-0700
New Revision: 10849

Modified:
   branches/release/0.22/src/conf/conf/intake.xml
   branches/release/0.22/src/java/org/tigris/scarab/util/ScarabConstants.java
   branches/release/0.22/src/webapp/WEB-INF/templates/macros/GlobalMacros.vm

Log:
FIX - Validation message is shown for fields of type "integer" on submitting a new issue.

Modified: branches/release/0.22/src/conf/conf/intake.xml
Url: http://scarab.tigris.org/source/browse/scarab/branches/release/0.22/src/conf/conf/intake.xml?view=diff&pathrev=10849&r1=10848&r2=10849
==============================================================================
--- branches/release/0.22/src/conf/conf/intake.xml	(original)
+++ branches/release/0.22/src/conf/conf/intake.xml	2009-09-16 06:50:17-0700
@@ -267,6 +267,7 @@
         </field>
         <field name="NumericValue" key="num" type="int">
            <rule name="mask" value="[0-9]+">intake_InvalidInteger</rule>
+           <required-message>intake_ModuleRequiresDataForAttribute</required-message>
         </field>
         <field name="UserIds" key="visids" type="int" multiValued="true"/>
         <field name="Value" key="val" type="String">

Modified: branches/release/0.22/src/java/org/tigris/scarab/util/ScarabConstants.java
Url: http://scarab.tigris.org/source/browse/scarab/branches/release/0.22/src/java/org/tigris/scarab/util/ScarabConstants.java?view=diff&pathrev=10849&r1=10848&r2=10849
==============================================================================
--- branches/release/0.22/src/java/org/tigris/scarab/util/ScarabConstants.java	(original)
+++ branches/release/0.22/src/java/org/tigris/scarab/util/ScarabConstants.java	2009-09-16 06:50:17-0700
@@ -212,6 +212,11 @@
     final String DROPDOWN_LIST = "Dropdown list";
 
     /**
+     * Another attribute type
+     */
+    final String INTEGER = "integer";
+    
+    /**
      * Scarab.properties key for roles to be automatically approved.
      */
     final String AUTO_APPROVED_ROLES = "scarab.automatic.role.approval";

Modified: branches/release/0.22/src/webapp/WEB-INF/templates/macros/GlobalMacros.vm
Url: http://scarab.tigris.org/source/browse/scarab/branches/release/0.22/src/webapp/WEB-INF/templates/macros/GlobalMacros.vm?view=diff&pathrev=10849&r1=10848&r2=10849
==============================================================================
--- branches/release/0.22/src/webapp/WEB-INF/templates/macros/GlobalMacros.vm	(original)
+++ branches/release/0.22/src/webapp/WEB-INF/templates/macros/GlobalMacros.vm	2009-09-16 06:50:17-0700
@@ -1074,6 +1074,8 @@
             #set ($field = $attVal.Attribute.AttributeType.ValidationKey)
           #elseif ($attVal.Attribute.AttributeType.Name == $scarabG.Constant.DROPDOWN_LIST)
             #set ($field = "OptionId")
+          #elseif ($attVal.Attribute.AttributeType.Name == $scarabG.Constant.INTEGER)
+            #set ($field = "NumericValue")
           #else
             #set ($field = "Value")
           #end

------------------------------------------------------
http://scarab.tigris.org/ds/viewMessage.do?dsForumId=3577&dsMessageId=2395549
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.