KevinGong

  BlogJava :: 首页 :: 联系 :: 聚合  :: 管理
  15 Posts :: 1 Stories :: 9 Comments :: 0 Trackbacks

#

     摘要: 今天系统需求需要,用JS写了个代码,希望有需要得朋友可以看看!  1 <! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"  2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" &...  阅读全文
posted @ 2006-07-26 21:01 KevinGong 阅读(2932) | 评论 (2)编辑 收藏

http://www.yaosansi.com/blog/article.asp?id=551
posted @ 2006-07-26 20:57 KevinGong 阅读(166) | 评论 (0)编辑 收藏


2篇文章介绍Google Web Toolkit 

面向 Java 开发人员的 Ajax: 使用 Google Web Toolkit 开发 Ajax:GWT(Google Web Toolkit) 是 Google 最近推出的一个开发 Ajax 应用的框架,它支持用 Java 开发和调试 Ajax 应用,本文主要介绍如何利用 GWT 进行 Ajax 的开发。
面向 Java 开发人员的 Ajax: Google Web Toolkit 入门:Ajax 被用于创建更加动态和交互性更好的 Web 应用程序。Google Web Toolkit (简称 GWT) 是 Google 推出的 Ajax 应用开发包,GWT 支持开发者使用 Java 语言开发 Ajax 应用。本文将介绍 GWT 开发 Ajax 应用的基本方法和步骤。

goolipse安装和使用:
googlipse插件:http://sourceforge.net/projects/googlipse

Requirements:

 Googlipse requires Eclipse 3.2 (必须3.2)with WebTools Platform 1.5(一定要装,)running on a Java 1.5 VM. You need to separately install Google Web Toolkit from :http://code.google.com/webtoolkit/download.html

Installation:

 (*) Drop the com.googlipse.gwt_<version>.jar file in your eclipse\plugins folder
 (*) Open Eclipse. Select Window->Preferences->Googlipse and set GWT home to the directory where you have installed the Google Web Toolkit.
 (*) You are all set to code.
 
Adding Googlipse to your project:

 Googlipse is implemented as a WTP Facet. When creating a new Dynamic Web Project, select Googlipse in the Project Facets page. If you already have a Dynamic Web Project, you can add Googlipse facet by selecting Project->Properties->Project Facets(Please make sure you don't have gwt-user.jar in your classpath). In case you didn't like Googlipse, you can remove the facet.

Creating a Module:

 Once you have a Dynamic Web Project with Googlipse facet, you can add a new module by File->New->Other->Googlipse->Gwt Module. Modules can be created only in valid java packages (default package is not allowed). Either you can type in the package (with project & source folder) in the location field or you can select it by clicking Browse button. You can also click the Create button to create a new package. Next type in the name of the module. Click Finish, you will have all the artifacts for the module generated.
 
Adding a Remote Service;

 Note :A Remote Service will be created only in a module. So if you don't have a module, you need to create one using the New Module wizard, before this step.
 You can select File->New->Other->Googlipse->Gwt Remote Service. Click the Browse button and select the module (the gwt.xml file). Type the name and uri for the service and click Finish. Now the artifacts for the remote service will be generated. (You have to add an entry in the gwt.xml file manually. Googlipse doesn't add it. This feature will be implemented in future versions)
 
Adding a Remote Service method:

 You can open the RemoteService interface and add/change methods in it. You need to provide the implementation of those methods in RemoteServiceImpl class, but thanks to Googlipse, you don't have to do anything in RemoteServiceAsync. Googlipse will automatically update the corresponding Async file whenever a RemoteService interface is changed.
 
Calling a method using Remote Service:

 The utility class in the Remote service should help you in making the remote call.
 
 MyRemoteServiceAsync async = MyRemoteService.Util.getInstance();
 async.makeRemoteCall(param1, param2, callback);
 
Running/Debugging a Gwt Application:

 Select Run->Run/Debug to activate the Lauch configuration dialog box. Double Click "Gwt Application". In the main page, you can select the Project & Module you want to run. In the parameters page you can select the parameters such as port and log level. Click Run to execute the GwtShell & bring up your application. The laucher will add the jar files & all the source folders in the project to your application.
 
 
Questions/Bugs/Suggestions?

 Drop a mail to googlipse-users@lists.sourceforge.net

posted @ 2006-07-20 08:35 KevinGong 阅读(223) | 评论 (0)编辑 收藏

     摘要: <! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" [ <!ELEMENT a (#PCDATA | table)*  >  ]> < html  xmlns ...  阅读全文
posted @ 2006-06-01 07:04 KevinGong 阅读(261) | 评论 (0)编辑 收藏

根据数据库来指定映射配置文件得主键生成策略.
Generator 为每个 POJO 的实例提供唯一标识。一般情况,我们使用“native”。class 表示采用由生成器接口net.sf.hibernate.id.IdentifierGenerator 实现的某个实例,其中包括:
“assigned”
主键由外部程序负责生成,在 save() 之前指定一个。

“hilo”
通过hi/lo 算法实现的主键生成机制,需要额外的数据库表或字段提供高位值来源。

“seqhilo”
与hilo 类似,通过hi/lo 算法实现的主键生成机制,需要数据库中的 Sequence,适用于支持 Sequence 的数据库,如Oracle。

“increment”
主键按数值顺序递增。此方式的实现机制为在当前应用实例中维持一个变量,以保存着当前的最大值,之后每次需要生成主键的时候将此值加1作为主键。这种方式可能产生的问题是:不能在集群下使用。

“identity”
采用数据库提供的主键生成机制。如DB2、SQL Server、MySQL 中的主键生成机制。

“sequence”
采用数据库提供的 sequence 机制生成主键。如 Oralce 中的Sequence。

“native”
由 Hibernate 根据使用的数据库自行判断采用 identity、hilo、sequence 其中一种作为主键生成方式。

“uuid.hex”
由 Hibernate 基于128 位 UUID 算法 生成16 进制数值(编码后以长度32 的字符串表示)作为主键。

“uuid.string”
与uuid.hex 类似,只是生成的主键未进行编码(长度16),不能应用在 PostgreSQL 数据库中。

“foreign”
使用另外一个相关联的对象的标识符作为主键。
posted @ 2006-05-25 08:15 KevinGong 阅读(1246) | 评论 (0)编辑 收藏

仅列出标题
共2页: 上一页 1 2