`
文章列表
HTML select option 详解 [本文转自]http://www.cnblogs.com/dcba1112/archive/2011/05/26/2057551.html   在HTML和XHTML中的区别   In HTML the <option> tag has no end tag. HTML中<option>标签不需要关闭 In XHTML the <option> tag must be properly closed.在XHTML中<option>标签必须合理关闭   javascript之HTML(se ...
背景说明: 1、当在文本框中输入完数据后直接按回车,然后用在JS中捕获事件再做相应处理; 示例: <script language="javascript"> function test(){ if (event.keyCode == 13){ alert("捕捉住回车提交事件!"); } }</script> <form method="post">标题:<input type="text" name=& ...
背景说明: 1、在主窗口页面中点击按钮或链接触发事件弹出有模式窗口(对话框); 2、关增长对话框后需要传值到主窗口; 示例: 1、在主窗口界面中加入类似以下JS函数,名字自定义: <script language="javascript"> function aa(){ var obj = new Object(); var result = window.showModalDialog("bb.html",obj,"dialogWidth=800px;dialogHeight=500px"); ...
     昨天遇到一个联合主键的问题,困扰了我很久,最后发现《Hibernate in Action》里有讲到,因为在实际环境中老是报错,也不知配置的对不对,然后回家写了一个DEMO,发现可以保存。 表结构大致如下: ITEM(ID,NAME)其中id是PK CATEGORY(ID,NAME),其中ID是PK CATEGORY_ITEM(ITEM_ID,CATEGORY_ID,THIRD_ID,ADDED_DATE),其中ITEM_ID,CATEGORY_ID分别是ITEM和CATEGORY的外键,而他们与THIRD_ID一起组成CATETORY_ITEM表的联合主键。 下面给出具体实现: 一、 ...
    昨天遇到一个问题:有两个相关联的PO类,一个是用Annotation注释的,一个是用hbm.xml文件映射的。现在主键生成策略是用一张表维护所有的表的主键的。 JPA的Annotation注解如下: @Id @GeneratedValue(strategy = GenerationType.TABLE,generator="customer_gen") @TableGenerator(name = "customer_gen", table=" ...
异常: Exception caught by error page: a different object with the same identifier value was already associated with the session: [com.radicasys.intimate.mail.account.MailAccount#1]; nested exception is org.hibernate.NonUniqueObjectException: a different object with the same identifier value was alrea ...
Struts2+Spring3+Hibernate3 一般情况下Struts2与Spring3整合时,struts的action给spring管理时要在struts.xml文件加一个<constant name="struts.objectFactory" value="org.apache.struts2.spring.StrutsSpringObjectFactory"/> 或者是<constant name="struts.objectFactory" value="spring"/> ...
Struts2+Spring3+Hibernate3 异常:org.hibernate.HibernateException: createCriteria is not valid without active transaction -------------- hibernate.xml文件: <bean id="hibernateProperties"       class="org.springframework.beans.factory.config.PropertiesFactoryBean">   <property ...
Global site tag (gtag.js) - Google Analytics