摘要:需求:在我们的项目里希望JsonString传入日期类型值为空时,JSONObject.toBean时可以将Java对象的该日期属性设为null。解决过程:json-lib反序列化Json字符串为Java对象,可以通过以下代码处理日期字段: public static <T> T JsonToBean(Class<T> clazz, String JsonString) { JSONUtils.getMorpherRegistry().registerMorpher( new DateMorpher(new String[] { "yyyy-M...
阅读全文
摘要:Subscriber:huazaiSubscriptionCode:uLR8ZC-855550-61565856301609203Subscriber:feifeiSubscriptionCode:sLR8ZC-855550-61565856701742177Subscriber:kobeSubscriptionCode:xLR8ZC-855550-615658598517277另附上申请注册码的网址,方便大家自行申请http://www.lephones.info/servlet/MyEclipseGenServlet转自:http://hi.baidu.com/bagewell/item/
阅读全文
摘要:Ext.getCmp(id).items.each(function(item) { //return; //相当于continue //return true; //相当于continue return false; //相当于break });原理:从.each的源码可以看到function(C,$){var B=[].concat(this.items);for(var A=0,_=B.length;A<_;A++)if(C.call($||B[A],B[A],A...
阅读全文