| Author |
Message |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 24/03/2007 12:31:33
|
khandur
Joined: 28/11/2006 00:00:00
Messages: 108
Offline
|
Hi!
I'm using Eclipse 3.2 and my icefaces projects have facelets working fine.
However, the content assist do not work im my .xhtml files!
I'm using JSP Editor to open the files.
I already tried to put an <jsp:root tag in my xhtml file, but it do not worked too.
I sow two topics about this problem:
http://www.icefaces.org/JForum/posts/list/3883.page and http://www.icefaces.org/JForum/posts/list/2501.page, bun no one of these topics has answer.
I think that more people have the same problem!
Thanks in advance.
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 26/03/2007 23:31:04
|
walisoncm
Joined: 28/09/2006 00:00:00
Messages: 3
Offline
|
I use Eclipse (WTP 1.5.3) and IceFaces (1.5.3) with Facelets (.jspx file extension) and content assistant work fine.
|
| Filename |
facelets_content_assistant_01.png |
Download
|
| Description |
JSF tag attributes content assistant. |
| Filesize |
37 Kbytes
|
| Downloaded: |
912 time(s) |
|
| Filename |
facelets_content_assistant_02.png |
Download
|
| Description |
Bean properties content assistant. |
| Filesize |
33 Kbytes
|
| Downloaded: |
647 time(s) |
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 27/03/2007 18:59:28
|
fabmars
Joined: 24/08/2006 00:00:00
Messages: 73
Offline
|
I noticed the content assist doesn't work if you declare your taglibs in a <f:view> tag as the root one instead of the <jsp:root> one and it also depends on the taglib declaration order.
This works for sure in Eclipse 3.2.2:
Code:
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ice="http://www.icesoft.com/icefaces/component">
|
http://www.suntriprecords.com |
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 02/04/2007 10:13:21
|
liming.wu
Joined: 26/10/2004 00:00:00
Messages: 403
Offline
|
content assist doesn't work if namespace declared in f:view and that is why we provides a template (file extension is .jsp). We are going to provide another template using style as <jsp:root xmlnx="...... with extension .jspx
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 02/04/2007 12:02:25
|
khandur
Joined: 28/11/2006 00:00:00
Messages: 108
Offline
|
fabmars wrote:
I noticed the content assist doesn't work if you declare your taglibs in a <f:view> tag as the root one instead of the <jsp:root> one and it also depends on the taglib declaration order.
This works for sure in Eclipse 3.2.2:
Code:
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ice="http://www.icesoft.com/icefaces/component">
Using jsp:root in my xhtml files, my page just do not worked and i get this error:
Code:
SEVERE: Problem in renderResponse: Error Parsing /aplicativosCliente.xhtml: Error Traced[line: 7] The prefix "jsp" for element "jsp:root" is not bound.
com.sun.facelets.FaceletException: Error Parsing /aplicativosCliente.xhtml: Error Traced[line: 7] The prefix "jsp" for element "jsp:root" is not bound.
at com.sun.facelets.compiler.SAXCompiler.doCompile(SAXCompiler.java:234)
at com.sun.facelets.compiler.Compiler.compile(Compiler.java:107)
at com.sun.facelets.impl.DefaultFaceletFactory.createFacelet(DefaultFaceletFactory.java:192)
at com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:141)
at com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:93)
at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:259)
at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:149)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:107)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:268)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:137)
at com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet.service(PersistentFacesServlet.java:406)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 02/04/2007 14:20:05
|
liming.wu
Joined: 26/10/2004 00:00:00
Messages: 403
Offline
|
You cannot use <jsp:root xmlns=... in xhtml for facelets. It doesn't work.
You can use ><jsp:root xmlns=... in ICEfaces JSF as a jspx file and it doesn't work for facelets. This template is a jspx page and code assistant works. This is NOT for facelets.
><?xml version="1.0" encoding="UTF-8"?>
<jsp:root version="1.2"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ice="http://www.icesoft.com/icefaces/component">
<jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" />
<f:view >
<html>
<head>
<title>ICEfaces page title</title>
<link rel="stylesheet" type="tex/css" href="./xmlhttp/css/xp/xp.css"/>
</head>
<body>
<ice:form>
</ice:form>
</body>
</html>
</f:view>
</jsp:root>
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 02/04/2007 14:31:13
|
khandur
Joined: 28/11/2006 00:00:00
Messages: 108
Offline
|
So, what can i do to use content assistant with facelets?
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 02/04/2007 16:57:32
|
liming.wu
Joined: 26/10/2004 00:00:00
Messages: 403
Offline
|
Currently ICEfaces eclipse integration doesn't provide special facelet design time support on top of Eclipse WTP or Eclipse WTP/JSF.
Regarding code assistant on Eclipse WTP for facelet, it is not something ICEfaces Eclipse has done wrong and it looks like a hot topic in facelet forum.
My temporary recommendation to make code-assistance and facelet page work in Eclipse WTP is
1. create page with extension .jspx
2. template would be like:
<?xml version="1.0" encoding="UTF-8"?>
<jsp:root version="1.2"
xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ice="http://www.icesoft.com/icefaces/component"
xmlns:ui="http://java.sun.com/jsf/facelets"
.......>
<f:view>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head> <title>ICEfaces page title</title>
<link rel="stylesheet" type="tex/css" href="./xmlhttp/css/xp/xp.css"/>
</head>
<body>
......
<ice:forum>
.......
</ice:forum>
.....
</body>
</html>
</f:view>
</jsp:root>
Give it a try.
Regards
Liming
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 02/04/2007 16:59:10
|
liming.wu
Joined: 26/10/2004 00:00:00
Messages: 403
Offline
|
Don't forget xmlns:jsp="http://java.sun.com/JSP/Page" in jsp:root
Liming
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 07/04/2007 08:06:10
|
fabmars
Joined: 24/08/2006 00:00:00
Messages: 73
Offline
|
Liming, there's twice the opening <html tag in your template.
|
http://www.suntriprecords.com |
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 07/04/2007 08:06:28
|
fabmars
Joined: 24/08/2006 00:00:00
Messages: 73
Offline
|
Yeah there we get the content assist to work with f: h: ice: jsp: tags, but not with the facelets ui: tag.
That's because the facelets jar has yet no tld
I could find jsf-ui.tld there : http://www.thearcmind.com/confluence/display/SHJFT/Getting+started+with+JSF,+Facelets,+Eclipse+WTP+and+Tomcat
Once you've put this file in your project's /WEB-INF, then content assist for facelets taglib works too.
|
http://www.suntriprecords.com |
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 07/04/2007 09:27:55
|
liming.wu
Joined: 26/10/2004 00:00:00
Messages: 403
Offline
|
>>there's twice the opening <html tag in your template.
Sorry. There should be only one ><html tag. Remove the second open ><html> please.
Thanks for pointing out the error.
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 12/04/2007 08:30:36
|
khandur
Joined: 28/11/2006 00:00:00
Messages: 108
Offline
|
fabmars wrote:
Yeah there we get the content assist to work with f: h: ice: jsp: tags, but not with the facelets ui: tag.
That's because the facelets jar has yet no tld
I could find jsf-ui.tld there : http://www.thearcmind.com/confluence/display/SHJFT/Getting+started+with+JSF,+Facelets,+Eclipse+WTP+and+Tomcat
Once you've put this file in your project's /WEB-INF, then content assist for facelets taglib works too.
This link is'nt working! Can u uploda the file in this post?
Thanks!
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 12/04/2007 08:50:59
|
khandur
Joined: 28/11/2006 00:00:00
Messages: 108
Offline
|
ooops, now i get the file, but that site is too slow...
Here is the file.
| Filename |
jsf-ui.tld |
Download
|
| Description |
Facelets TLD, just put into your WEB-INF directory. |
| Filesize |
8 Kbytes
|
| Downloaded: |
1280 time(s) |
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 12/04/2007 13:30:49
|
liming.wu
Joined: 26/10/2004 00:00:00
Messages: 403
Offline
|
You should put tlds under WEB-INF/tld according to spec. But putting tlds under WEB-INF works in most web containers.
|
|
|
 |
|
|