ITeye博客

liukuo165的博客

liukuo165 · 共 49 篇文章

转:JS控制只能输入数字和小数点

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" type="text/javascript"></script> <script type="text/javascript"> //示例代码: //只允许输入数字与.:<input type="text" name="test" id="test" onkeydown="checkKeyForFloat(this.value,event)" style="ime-mode: disabled" /> //只允许输入数字 :<input …

2014-01-01 21:45 · javascript · 评论(0)

String数组与list之间的相互转化

将数组转化成List String[] array = ids.split(","); List<String> list = Arrays.asList(array); 将list转化成数组 List<String> list = Arrays.asList(array); String[] array = list.toArray();

2013-12-19 10:41 · 综合知识 · 评论(0)

linux查看文件中间某几行的命令

查看 logs/catalina.out文件从8703000行开始后的200行 cat logs/catalina.out | tail -n +8703000 | head -n 200

2013-12-17 15:35 · linux学习 · 评论(0)

GWT Grid数据量大的时候显示慢解决办法

通过给Grid设置BufferView来让它延迟加载,边滚动边加载 BufferView bufferView = new BufferView(); bufferView.setRowHeight(26); bufferView.setCacheSize(300); bufferView.setBufferEnabled(true); bufferView.setScrollDelay(1); grid.setView(bufferView);

2013-12-11 14:41 · GWT · 评论(0)

Spring3.2与Hibernate整合问题

1.报org.hibernate.HibernateException: No Session found for current thread错误 把hibernate中这项配置注释掉 并把Service中的事务 @Transactional(propagation=Propagation.REQUIRED .... 配置成REQUIRED,或其他需要事务的配置,如果是NOT_SUPPORTED 2.org.hibernate.HibernateException: createQuery is not valid without active transa ction 把 注释掉就行了。

2013-12-02 23:05 · SSH · 评论(0)

GWT用frame调用JSP

Frame htmlFrame = new Frame("../OurHome/modules/core/mainIndex.jsp?merchantId="+merchantId+"&columnId="+columnId); htmlFrame.removeStyleName(htmlFrame.getStyleName()); DOM.setElementPropertyInt(htmlFrame.getElement(), "frameBorder", 0); htmlFrame.setSize("100%", "100%"); container.add(htmlFrame);

2013-11-28 09:18 · GWT · 评论(0)

EXTJS4下拉选择树

extjs4下拉选择树,代码是从网上找到的。 控件源代码: Ext.define('Ext.tree.ComboTree',{ extend :"Ext.form.field.Picker", alias: 'widget.combotree', requires: ['ext.form.*','ext.tree.panel'], rootText:this.rootText||'root', rootId:this.rootId||'0', rootVisible:this.rootVisible||false,//根节点是否可见 nodeParam:this.nodeParam||'id…

2013-11-26 00:20 · ExtJS · 评论(0)

EXTJS4 Form表单中Combox取值与设置值问题

extjs中combobox取值会取到显示值,取不到value值,所以在表单提交的时候不能用form.submit();要把所有的值都取出来用ajax提交。 ComboBox代码 Ext.define('App.view.RoleComboBox',{ extend:'Ext.form.ComboBox', alias:['widget.rolecombobox'], fieldLabel:'Role', valueField:'id', displayField:'name', name:'role', hiddenName:'role', triggerAction:'all', lab…

2013-11-25 21:54 · ExtJS · 评论(0)

extjs4使用google map

首先引入JS <script src="../ext4/examples/ux/GMapPanel.js"></script> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false&language=zh-CN"></script> 其中GMapPanel.js是extjs中自带的,代码是 /** * @author Shea Frederick */ Ext.define('Ext.ux.GMapPanel', { extend: 'Ext.panel.Panel', alia…

2013-11-20 23:36 · ExtJS · 评论(0)

extjs4与FCKeditor整合

EXTJS4与FCKeditor整合: 1.自定义CKeditor控件,继承自textArea Ext.define('Ext.ux.form.CkEditor', { extend: 'Ext.form.field.TextArea', alias: 'widget.ckeditor', onRender : function(ct, position){ if(!this.el){ this.defaultAutoCreate = { tag: "textarea", autocomplete: "off" }; } this.callParent(arguments); this.ed…

2013-11-19 23:25 · ExtJS · 评论(0)

IDEA开启tomcat就卡死无法调试

一开启tomcat调试就卡,一停马上就有反应,这种情况一般点设置了断点的原因,可以在启动的tomcat的界面点击查看断点 并将图中的勾去掉,一般就可以了.

2013-11-19 23:25 · 综合知识 · 评论(0)

转:JPA注解

1、@Entity(name="EntityName") 必须,name为可选,对应数据库中一的个表 @Entity //标识这个pojo是一个jpa实体 public class Users implements Serializable { } 2、@Table(name="",catalog="",schema="") 可选,通常和@Entity配合使用,只能标注在实体的class定义处,表示实体对应的数据库表的信息 name:可选,表示表的名称.默认地,表名和实体名称一致,只有在不一致的情况下才需要指定表名 catalog:可选,表示Catalog名称,默认为Catalog("").…

2013-11-07 22:36 · SSH · 评论(0)

Not supported by BasicDataSource

spring 与jpa整合抛Not supported by BasicDataSource 异常, 要把spring 里面hibernate里配置数据源的部分注释掉 liang.domain org.hibernate.dialect.MySQLDialect </bean>

2013-11-07 21:49 · SSH · 评论(0)

json-lib-jdk包maven仓库下载

前两天需要在项目里配置json-lib来处理一下json数据。 于是在pom.xml里配置json-lib的依赖。 配置如下: net.sf.json-lib json-lib 2.4 但是配置完了之后package的时候却无法成功了。很是让人郁闷。不知道那里出问题了。后来到了maven的库里一看才知道,原来json-lib-2.4分不同jdk版本有不同的jar包。需要添加依赖的时候增加一个classifier属性来指定使用哪个版本的。于是改为如下配置: net.sf.json-lib json-lib 2.4 jdk15

2013-11-06 23:44 · maven · 评论(0)

httpclient对接,跳转多次

PostMethod setFollowRedirects(true);设置为ture,保证跳转后参数不丢失.

2013-10-09 09:47 · 综合知识 · 评论(0)