Revision: 1293
Author:   mathiasbr
Date:     2006-08-09 14:59:59 -0700 (Wed, 09 Aug 2006)
ViewCVS:  http://svn.sourceforge.net/spring-rich-c/?rev=1293&view=rev

Log Message:
-----------
add setFieldProtected method

Modified Paths:
--------------
    
trunk/spring-richclient/support/src/main/java/org/springframework/binding/form/support/UserMetadata.java
Modified: 
trunk/spring-richclient/support/src/main/java/org/springframework/binding/form/support/UserMetadata.java
===================================================================
--- 
trunk/spring-richclient/support/src/main/java/org/springframework/binding/form/support/UserMetadata.java
    2006-08-09 21:53:57 UTC (rev 1292)
+++ 
trunk/spring-richclient/support/src/main/java/org/springframework/binding/form/support/UserMetadata.java
    2006-08-09 21:59:59 UTC (rev 1293)
@@ -45,4 +45,16 @@
         FieldMetadata metaData = formModel.getFieldMetadata(fieldName);
         return 
Boolean.TRUE.equals(metaData.getUserMetadata(UserMetadata.PROTECTED_FIELD));
     }
+
+    /**
+     * defines the protectable state for a field
+     * 
+     * @param formModel the formmodel
+     * @param fieldName the field to protect
+     * @param protectedField if true the field will be defined as protectable 
otherwise false
+     */
+    public static void setFieldProtected(FormModel formModel, String 
fieldName, boolean protectedField) {
+        FieldMetadata metaData = formModel.getFieldMetadata(fieldName);
+        metaData.getAllUserMetadata().put(PROTECTED_FIELD, 
Boolean.valueOf(protectedField));
+    }
 }


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
spring-rich-c-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/spring-rich-c-cvs

Reply via email to