Index: lams_common/src/flash/org/lamsfoundation/lams/common/util/StringUtils.as =================================================================== diff -u -r3d25b955fe079be3d39875ff319b0495242a3824 -r269b8f86247c1dab751c54abeece498e68a827e8 --- lams_common/src/flash/org/lamsfoundation/lams/common/util/StringUtils.as (.../StringUtils.as) (revision 3d25b955fe079be3d39875ff319b0495242a3824) +++ lams_common/src/flash/org/lamsfoundation/lams/common/util/StringUtils.as (.../StringUtils.as) (revision 269b8f86247c1dab751c54abeece498e68a827e8) @@ -195,6 +195,57 @@ uid = year_str + month_str + day_str + hour_str + minute_str + second_str + milliSecond_str + '-'+ id; return uid; - } + } + + + /** + * Checks to see if the value passed in is null, undefined or a blank string + * @usage + * @param v + * @return + */ + public static function isEmpty(v):Boolean{ + if(v == undefined || v== null || v==""){ + return true; + }else{ + return false; + } + } + + /** + * Checks to see if the value passed in is any of the null values defined in Config. + * @usage + * @param v + * @return boolean true if null + */ + public static function isWDDXNull(v):Boolean{ + if(v==Config.STRING_NULL_VALUE){ + return true; + } + if(v==Config.NUMERIC_NULL_VALUE){ + return true; + } + if(v==Config.STRING_NULL_VALUE){ + return true; + } + if(v==Config.DATE_NULL_VALUE){ + return true; + } + if(v==Config.BOOLEAN_NULL_VALUE){ + return true; + } + return false; + } + + public static function isNull(v):Boolean{ + if(isEmpty(v)){ + return true; + }else if(isWDDXNull(v)){ + return true; + }else{ + return false; + } + + } } \ No newline at end of file