显示标签为“JSF”的博文。显示所有博文
显示标签为“JSF”的博文。显示所有博文

2008年7月3日星期四

JSF Custom Compoment development tips

1. JSP taglib
In JSF, the scriplet like "#{RequestBean1.name}" is treated as a ValueExpression field in tab class. The corresponding tab lib definition file should nests the attribute type with deferred-value.

And also in tld file, jsp-version 2.1 element should be included. If this scriplet is missed, some container like Tomcat 6.0.16 will take this tag as generial tag and if we invoke isLiteralText() on the ValueExpression object, true will return. It was not excepted. But the GlassFish V2 ignored this and took 2.1 as default.

2. Why setProperties() in tag handler java is not invoked?
You should define all property of jsf component java in faces-config.xml. Sometimes it looks like that a attribute is defined twice: one in tld, one in faces-config.xml. JSF Template can make these things easy by generating all configuration file. In order to archive this, it introduces some anonations.

3. Why did some data shown on page disappear after re-loading the page?
implement the saveState/restoreState method.

2008年4月12日星期六

在Netbeans 6.1中使用dojo开发自定义的JSF组件

前提:netbeans 6.1 beta。

目的:开发一个功能最简的JSF woodstock组件。

准备:Firefox + FireBug插件

原文在这里。压根儿拷贝不过来,又一个信息孤岛。