文章列表
问题描述:
今天又发现了Ext源码的小bug,TriggerField.js中源码如下:
// private
onFocus : function(){
Ext.form.TriggerField.superclass.onFocus.call(this);
if(!this.mimicing){
this.wrap.addClass(this.wrapFocusClass);
this.mimicing = true;
this.doc.on('m ...
今天修改Ext源码时,使用了setTimeout方法,setTimeout(func,ms)其中func方法中的this引用指向的居然是windows,并不是源对象的引用,而且给func方法传参数很是麻烦,经过与同事沟通,了解到Ext也有相应的延迟任务的api,其源码如下:
Ext.util.DelayedTask = function(fn, scope, args){
var me = this,
id,
call = function(){
clearInterval(id);
...
今天从同事那里了解到一个接口 org.apache.struts2.interceptor.NoParameters,之前从来没用过,私下研究了一下觉得很有用,记下来留作以后参考:
NoParameters.java,源码附上:
package org.apache.struts2.interceptor;
/**
* This marker interface should be implemented by actions that do not want any parameters set on
* them automatically. This may be use ...
1.收编代码的环境抛出了一个异常:
org.hibernate.exception.SQLGrammarException: could not execute query
定位了半天才知道,原来是数据库的表,与hibernate配置的字段对应不上,在此记下避免以后再遇到这个问题。
2.Java的properties配置文件key值既然也可以设置成中文,太强大了:、
config.properties
键=值
native2ascii config.properties config2.properties
\u952e=\u503c
...