Scarab commit: svn commit: r10701 - trunk/src/webapp/WEB-INF/templates/macros/GlobalMacros.vm

Hussayn Dabbous <[email protected]>
Newsgroups gmane.comp.java.scarab.cvs
Message-ID <[email protected]>
Author: dabbous
Date: 2009-02-19 09:44:40-0800
New Revision: 10701

Modified:
   trunk/src/webapp/WEB-INF/templates/macros/GlobalMacros.vm

Log:
This commit refers to SCB2797

Now the attributes are rendered as follows:

- if a hint exists and an input field is empty, the hint will be placed into the input field as placeholder for the user.
- if no hint exists, fields are rendered empty on creation
- if a format (regexp) exists for a field, the field is checked to match the regex. If the match fails, an error is shown.



Modified: trunk/src/webapp/WEB-INF/templates/macros/GlobalMacros.vm
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/webapp/WEB-INF/templates/macros/GlobalMacros.vm?view=diff&pathrev=10701&r1=10700&r2=10701
==============================================================================
--- trunk/src/webapp/WEB-INF/templates/macros/GlobalMacros.vm	(original)
+++ trunk/src/webapp/WEB-INF/templates/macros/GlobalMacros.vm	2009-02-19 09:44:40-0800
@@ -218,13 +218,13 @@
             #set ( $fieldName = $attrInput.Value.Key )
             #set ( $fieldValue= $!attrInput.Value )
           #end
-          #if ($fieldValue.value == "") #set ($fieldValue = $hint) #end
+          #if ($fieldValue.toString().equals("")) #set ($fieldValue = $hint) #end
           <input         
             type="text" 
             name="$fieldName" 
             value="$fieldValue"
             #if($size > 0) size="$size" #else class="fullWidth" #end /> 
-            #if ( !$fieldValue.equals($hint) ) $hint #end
+            #if ( !$fieldValue.toString().equals($hint) ) $hint #end
             
         #end
 #end

------------------------------------------------------
http://scarab.tigris.org/ds/viewMessage.do?dsForumId=3577&dsMessageId=1193132
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.