2008-05-12

Tapestry5每日播报(20080512)

关键字: tapestry5 t5components prop ognl onactivate 相对路径 绝对路径 nonbel
1.介绍Tapestry5的新文章发布Tapestry for Nonbelievers ,写的很好,推荐大家阅读。 2.邮件列表T5.0.11: onActivate() called twice, more questions ,问题跟Tapesetry5的路径问题有关,这个也是一直困扰我的地方,例如生成的url为 http://localhost:8607/myApp/start/testmessage ,图像路径为myApp/images/image.jpg,如果使用相对路径<img src="images/image.jpg"/&g ...
2008-05-10

Tapestry5开发系列:如何在Eclipse中运行jetty

关键字: tapestry5 eclipse jetty 插件 runjettyrun
Jetty是个类似tomcat的web server,体积小、启动快、可内嵌,开发中使用起来很方便,eclipse的插件中支持jetty的有个jettylauncher ,可jettylauncher只支持eclipse2.x/jetty5.x(有人hack了代码,可以支持高版本的eclipse,但还是支持不了jetty6.x)。现在支持jetty6的有个runjettyrun 插件,支持最新版本的eclipse和jetty,而且其本身就自带jetty6,不需要单独下载和配置jetty了,runjettyrun插件的安装和使用请参考这里 。 我在使用Runjet ...
2008-05-09

Tapestry5每日播报(20080509)

关键字: tapestry5 release 教程 下划线
Tapestry5每日播报(20080509) 1.变量命名中的下划线正在被移除,具体原因看下作者解释。 PS:终于去掉下划线了,其实各有利弊,我是不用的,那个wrap作者在为什么不喜欢Tapestry5的文章里也提到了这点。 2.邮件列表里有人问道Tapestry5什么时候能够release,作者回答说估计下个周可以。 3.作者在blog中提到更新了Tapestry5的官方教程,查看新教程。 每日播报的信息来自于邮件列表,信息同时发布于Tapestry5.com
Form组件直接可以接受参数 tml:<form t:type="Form" t:id="loginForm" t:context="name"> java:void onSuccessFromClubPlayerForm(String idPlayer){} @Retain其实相当于页面中的application范围的值,可在取值时初始化,初始化好后保存 于页面实例中,请求结束后不清除,常用于SelectModel之类。 @Retain private List<String> names; public List<String> getNames() ...
Tapestry从5.0.6开始使用tml作为模板文件的扩展名,dreamveaver无法识别tml文件,在网上找了些资料,参考了http://blog.chinaunix.net/u/13637/showart.php?id=394894这篇文章,终于可以像修改html文件一样修改tml文件了,现修改整理如下: 1、使Dreamweaver能识别*.tmp文件,并当做html页面来处理,需要修改两个文件, (1)Extensions.txt------位于你的用户目录下,位于dreamveaver安装目录下的configuration文件夹下。 (2)MMDocumentType ...
Tapestry4.1.x中内置dojo实现ajax功能,不用写任何的javascript就可以实现, 具体步骤如下。 1、用Shell组件包含进dojo,Shell组件会自动配置dojo包。 <html jwcid="@Shell" title="Basic Ajax Page"> <body jwcid="@Body"> <p>Basic javascript inclusion sample.</p> </body> </html> 2、使用updateComponents参数 这个参数已经在很多组件里实现,加上这个参数就可以实 ...
注入方式: @InjectObject("service:tapestry.globals.HttpServletResponse") public abstract HttpServletResponse getServletResponse(); service一览: tapestry.globals.HttpServletRequest tapestry.globals.HttpServletResponse tapestry.globals.ServletContext tapestry.globals.ApplicationGlobals tapestry.globals.IReq ...
2007-06-27

新版Tapestry4.1.2在性能上的提升

关键字: Tapestry4.1.2 性能
一、ognl2.7带来的性能上的提升 这个版本应该早就该释出的,一直在等ognl2.7版本的稳定,不过这也是值得的,ognl2.7带来性能上的提升是可观的。在Tapestry4.1.2投票的时候就测试出跟Tapestry-prop不兼容,但ognl采用了跟prop一样的javassist增强来实现,应该说ognl在性能上跟prop差不了多少了(没实际测试,只是从理论上来说),而且ognl提供了更多的功能,Tapestry4.1.x版本的prop可以放弃了(T5中已经默认为prop了,那个prop跟T4的不一样,题外话),关于prop跟ognl老版本的性能测试可以参考这里(http://tape ...
2006-12-30

深入理解Tapestry的Rewind

关键字: tapestry rewind
Tapestry的rewind一直是学习和使用Tapestry的难点,rewind是用来处理表单提交的,表单默认使用的是DirectService来提交。在详细介绍之前,先说明下此文中需要用到的一些概念,首先是表单组件,我这里指的是指继承自AbstractFormComponent类的组件,例如:TextField、TextArea、Checkbox等,而不是具体的Form组件,表单组件使用时必须在Form组件中,这些组件在rewind时调用继承自AbstractFormComponent的rewindFormComponent来读取数据,并将数据赋值给容器或者页面。 我们来看一下最简单的Te ...
2006-12-28

The way of checking the type of an object

关键字: javascript
Apress ProJavaScriptTechniques The first way of checking the type of an object is by using the obvious-sounding typeof operator. js 代码   // Check to see if our number is actually a string   if ( typeof& ...