re: 自定义开发具有Ajax功能的JSF组件 gembin 2008-03-10 10:50
照上面的代码我运行之后,为什么有如下错误
SEVERE: Exception in PhaseListener RESTORE_VIEW(1) afterPhase
java.lang.NullPointerException: No component found under specified client id: j_id_jsp_1270516925_2
at com.sterning.jsf.ajax.AjaxListener.handleAjaxRequest(AjaxListener.java:60)
at com.sterning.jsf.ajax.AjaxListener.afterPhase(AjaxListener.java:42)
我晕,怎么贴的都是书的目录和一些....信息
给人感觉像卖书的
re: Eclipse精粹学习笔记 gembin 2008-03-05 16:47
Eclipse精粹学习笔记 ?
题目和内容不太吻合把
re: 学习Eclipse NLS gembin 2008-03-05 11:57
是可以的。请看如下例子:
message.properties
------------------
key_1=Say {0} hello to {1} !!
key_2=Say {0} hello to {1} !!
key3=Say {0} hello to {1} !!
key4=Say {0} hello to {1} !!
TobeBindedMsg.java
---------------------
public class TobeBindedMsg {
public static String key3;
static class InnerMsg{
public static String key4;
}
}
TestNLS.java
------------------
import org.eclipse.osgi.util.NLS;
public class TestNLS {
private static final String BUNDLE_NAME = "com.meccala.blog.util.message"; //$NON-NLS-1$
public static String key_2;
static {
NLS.initializeMessages(BUNDLE_NAME, TestNLS.class);
NLS.initializeMessages(BUNDLE_NAME, Inner.class);
NLS.initializeMessages(BUNDLE_NAME, TobeBindedMsg.class);
NLS.initializeMessages(BUNDLE_NAME, TobeBindedMsg.InnerMsg.class);
}
static class Inner {
public static String key_1;
}
public static void main(String ggg[]) {
String s = NLS.bind(Inner.key_1, "1", "gembin");
System.out.println(s);
String s1 = NLS.bind(TestNLS.key_2, "2", "gembin");
System.out.println(s1);
String s2 = NLS.bind(TobeBindedMsg.key3, "3", "gembin");
System.out.println(s2);
String s3 = NLS.bind(TobeBindedMsg.InnerMsg.key4, "4", "gembin");
System.out.println(s3);
}
}
最后的输出:
Say 1 hello to gembin !!
Say 2 hello to gembin !!
Say 3 hello to gembin !!
Say 4 hello to gembin !!
NOTE:因为Key要求是public static 的所以Inner Class必需是static
re: FCKeditor与JSF的整合 gembin 2008-02-26 16:06
gembin@gmail.com
强烈需要源码阿,谢谢!!!!!!!!!!!!!!!!!!!!!
re: 学习Eclipse NLS gembin 2008-01-26 15:31
Eclipse SRC里的: No need Localized String 1
可代替ResourceBundle,用来处理资源文件*.properties,效率更好,更方便,很好的扩展性。
当有Key没定义,会get a compile error.
缺点是:必须维护2个文件1个Properties和1个Java文件,他们必须同步
re: 关于服务端生成js的构思 gembin 2008-01-02 18:46
如何动态生成JS并在客户端加载?
似乎第一次加载时往往有些JS不能被加载
请点击这里下载本文的Eclipse工程]
无法下载+!
如何下载?
Gembin@gmail.com
WorkbenchWindow ww = (WorkbenchWindow) Activator.getDefault().getWorkbench().getActiveWorkbenchWindow();
不行,没有这个方法getWorkbench().