How to bind the local files to TFS Server
2011-03-29 13:22
417 查看
z在作Facelet+JSF开发的时候,根据facelet的基本配置说明,我们会把jsf的默认文件后缀明设置成.xhtml
然后会在xhtml文件里面添加上jsf标签的声明
但是会发现,eclipse的HTML编辑器却没有办法对<f:xx>的标签进行自动提示,这对进行jsf开发的是非常郁闷的,那么多的标签,如果在加上扩展的标签,那是非常恐怖
我们发现,当我们用jsp文件的时候,eclipse打开的是jsp editor(不是HTML Editor)
如果用<%taglib%>标签引入标签定义,编辑器就可以正常的自动联想
因此,我们用如下方法可以解决标签自动联想
1. 将xhtml文件的默认编辑器设置成jsp editor
2. 在Preference->Content Types->JSP 中添加File association *.xhtml
然后重新打开xhtml就可以发现,标签自动联想了
<context-param> <param-name>javax.faces.DEFAULT_SUFFIX</param-name> <param-value>.xhtml</param-value> </context-param>
然后会在xhtml文件里面添加上jsf标签的声明
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html"> ....... </html>
但是会发现,eclipse的HTML编辑器却没有办法对<f:xx>的标签进行自动提示,这对进行jsf开发的是非常郁闷的,那么多的标签,如果在加上扩展的标签,那是非常恐怖
我们发现,当我们用jsp文件的时候,eclipse打开的是jsp editor(不是HTML Editor)
如果用<%taglib%>标签引入标签定义,编辑器就可以正常的自动联想
因此,我们用如下方法可以解决标签自动联想
1. 将xhtml文件的默认编辑器设置成jsp editor
2. 在Preference->Content Types->JSP 中添加File association *.xhtml
然后重新打开xhtml就可以发现,标签自动联想了
相关文章推荐
- How To Install the BIND DNS Server on CentOS 6
- How to Run a Root “/” Site with the VS/VWD 2005 Local Web Server
- Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1
- How To Upload Files to the Internet Information Server
- IOS: How to authenticate the GKLocalPlayer on my 'third party server'.
- git pull 时出现 error: Your local changes to the following files would be overwritten by merge的解决办法
- How to populate menu from the SiteMapDataSourc, Database, xml files.
- How to detect the types of executable files
- How to use "vi" edit the docs or source code files
- How to Fix “HTTP Error 403.14 – Forbidden The Web server is configured to not list the contents of this directory”
- How to Untarget the JMS Reporting Provider When Server Not Running
- Git版本控制工具使用:Error pulling origin: error: Your local changes to the following files would be overwritten by merge
- How to Change the MySQL Time Zone on an Ubuntu Server
- git提示 error: Your local changes to the following files would be overwritten by merge:
- How to reset the Domain Admin Password under Windows Server 2003
- How to .gitignore all files/folder in a folder, but not the folder itself?
- How to release the port of TCP Client immediately when the connection is disconnect with the TCP server. - TCP 客户端与 TCP 服务器断开连接后
- Steps to change the default location of SQL Server /SQL Server Agent - Error log files
- How to collect the full path name of the files in ASM diskgroups (文档 ID 888943.1)
- How to generate DLL files by GCC in the MinGW?