Content Assistant in Eclipse using facelets
[Logo]
ICEsoft.org Forums: ICEfaces, ICEmobile, ICEpdf
[Search] Search   [Recent Topics] Recent Topics   [Groups] Home Page | www.icefaces.org  [Register] Register  [Login] Login 
Content Assistant in Eclipse using facelets  XML
Forum Index -> Tools Go to Page: Previous  1, 2, 3 Next 
Author Message
khandur

Joined: 28/11/2006 00:00:00
Messages: 108
Offline


liming.wu wrote:
You should put tlds under WEB-INF/tld according to spec. But putting tlds under WEB-INF works in most web containers.
 


I did'nt know it... Thanks!
keefer

Joined: 24/05/2007 00:00:00
Messages: 17
Offline


Has anyone tested this in Eclipse 3.3 (Europa)? It did not work for me.

Thanks,
--keefer
liming.wu

Joined: 26/10/2004 00:00:00
Messages: 407
Offline


WTP 2.0 is the version for Eclipse 3.3.
JSF project is a part of WTP 2.0, which has been changed a lot. We are working on it.
[Email]
khandur

Joined: 28/11/2006 00:00:00
Messages: 108
Offline


Using Faceletc Templates, with Eclipse 3.2, content Assistant do not work anymore, even if I use files .jspx!

The header of my file is like this:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
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:ui="http://java.sun.com/jsf/facelets"
xmlns:ice="http://www.icesoft.com/icefaces/component"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:fn="http://java.sun.com/jsp/jstl/functions"
template="navegador/GSFtemplate.jspx">
<ui:define name="body">
...
</ui:define>
</ui:composition>


And this is the header of my template file:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<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:ui="http://java.sun.com/jsf/facelets"
xmlns:ice="http://www.icesoft.com/icefaces/component"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:fn="http://java.sun.com/jsp/jstl/functions">
<f:view>
...
</f:view>
</jsp:root>
khandur

Joined: 28/11/2006 00:00:00
Messages: 108
Offline


Hi again!

Is there, half year before last post, any discovered way to make code complete work without changing the file extension do .jspx?
maguri

Joined: 17/07/2006 00:00:00
Messages: 84
Offline


Hi,

Regarding the problem that Eclipses Code Completion and Properties View when building .xhtml pages I strongly beleive its some ICEFaces problem because:

1. Eclipses Web Page Editor works ok with xhtml pages using other component sets like JBoss RichFaces, plain JSF Html components, MyFaces, etc. ICEFaces is the only one not working.


2. I instaled de JBossTools plugin, used the JBoss Tool HTML Editor and the situation is exactly the same.

3. If I use jspx pages, Code Completion and Properties View work correctly.

As I'm using facelets, pages should be xhtml and not jspx, isn't that right?

I would like very much to solve this problem as in a few days I'm starting a new project and wish to use ICEFaces and facelets.



Thanks a lot

A.Gurisatti
[Email]
maguri

Joined: 17/07/2006 00:00:00
Messages: 84
Offline


Hi,

I would appreciate very much any comment comming from ICEFaces people to know if there is a workaround other than "Use jspx"


Thanks a lot

A.Gurisatti
[Email]
tfreyne

Joined: 12/09/2007 00:00:00
Messages: 51
Offline


Hi,


There is a known issue in Eclipse 3.3 regarding .xhtml facelets code completion. Here is the official post: https://bugs.eclipse.org/bugs/show_bug.cgi?id=192393

The short version:
- use .jspx for code completion (ugly but it works)
- run the patch that is provided (not very user friendly)
- wait for a new dot release

Another option is:

Although Eclipse 3.3 is the most advanced free IDE but is currently not capable of doing code-completion for xhtml files. So use another IDE like Red Hat Development studio which has the Exadel Studio plugin and is thus capable of doing the code completion for xhtml. But it does not have a production release (at the time opf writing only Release Canditate 1)


For clarification how to use the jspx solution (when you're a newbie or just new to this issue) here is the full solution:

You can use .xhtml pages or .jspx pages for Facelets by setting this context parameter in the web.xml:

Code:
 <context-param>
 		<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
 		<param-value>.jspx</param-value>
 	</context-param>
 


The actual jspx file would look something like this:

Code:
 <?xml version="1.0" encoding="ISO-8859-1" ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
 	xmlns:ui="http://java.sun.com/jsf/facelets"
 	xmlns:h="http://java.sun.com/jsf/html"
 	xmlns:f="http://java.sun.com/jsf/core"
 	xmlns:ice="http://www.icesoft.com/icefaces/component" version="2.0">
 
 	<ui:composition template="../templates/commonsecondarywindow.jspx">
 
 
 		<ui:define name="content">
 						<ice:outputText value="IceFaces with Facelets outputText" />
 		</ui:define>
 ...
 


and the template would look something like this:

Code:
 <?xml version="1.0" encoding="ISO-8859-1" ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
 	xmlns:ui="http://java.sun.com/jsf/facelets"
 	xmlns:h="http://java.sun.com/jsf/html"
 	xmlns:f="http://java.sun.com/jsf/core"
 	xmlns:ice="http://www.icesoft.com/icefaces/component" version="2.0">
 
 	<html xmlns="http://www.w3.org/1999/xhtml">
 	<head>
 	<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
 		</head>
 	<body >
 <ui:insert name="content">Content</ui:insert>
 ...
 



NOTE: There will (still) not be code completion for the <ui:...>-tags but thats another story... All other tags will have this code completion.


Hope this answers your question.
maguri

Joined: 17/07/2006 00:00:00
Messages: 84
Offline


Hi,

Thaks for your answer.

In my post I stated that I installed the JBoss Tools plugin that is somehow an equivalent of Red Hat Developper Studio in many aspects (Lets say that it is the free version).

I also stated that neither using Eclipse 3.3.1 native "Web Page Editor" nor Red Hat Developper Studio "Html Editor" nor Red Hat Developper Studio "JSP Editor" I have Code Completion or Parameter View for ICEFaces components.

I do have them in both cases for Rich Faces, Plain Standard JSF and others

That is exactly why I beleive it has more to do with ICEFaces than with Eclipse.

And that is exactly why I would very grateful to have a word from ICEFaces gurus.

I know that using facelets with jspx things work and I'm using them. But it shouldn't be so.

I'm curious to know witch IDE, people in ICEFaces used to build the timezone7 tutorial. It contains xhtml pages.

Thanks a lot

A.Gurisatti
[Email]
maguri

Joined: 17/07/2006 00:00:00
Messages: 84
Offline


Hi everyone,

After struggling for a time with the problem I found and solved (just by chance) my problem with Content assist and properties view with xhtml files. It was all my fault caused by the way I used to assign libraries to my projects. I always added libraries using the Build Path option, adding libraries with the add External jars and configuring witch libraries should be deployed.

By including the deployable libraries, including ICEFaces ones in the Web App Libraries (by copying them to the lib folder), the problem disappears. Every Thing works ok, at least using JBoss Tools Html Editor included in Red Hat Developper Studio and JBoss Tools plugin.


Thanks a lot

A.Gurisatti
[Email]
tfreyne

Joined: 12/09/2007 00:00:00
Messages: 51
Offline


Hi,


can someone please provide a basic working example (war-file with sources) so I can see that I am doing the correct things because I installed everything and still I cannot use code completion for xhtml files with icefaces tags. ALL other tags work fine: facelets, tomahawk,.. all BUT icefaces.

I'm using Eclipse 3.3 (fully updated today) and JBoss Tools 2.0 -GA

Greetings and many thanks,

T
tfreyne

Joined: 12/09/2007 00:00:00
Messages: 51
Offline


Hi, I posted a solution to this in a new topic:

http://www.icefaces.org/JForum/posts/list/10185.page

Greetings,
T.
KrishPrabakar

Joined: 24/10/2008 00:00:00
Messages: 2
Offline


I found a workaround to get autocomplete for Icefaces in Ganymede Eclipse 3.4:

1. Download and install icefaces eclipse plugin (for Ganymede Eclipse 3.4) from icefaces website.

2. Open Eclipse. Now Goto Window -> Preferences -> General -> Content Types. On the right hand side, expand 'Text', select JSP, click Add button and provide *.xhtml.

Now auto-complete should work.

- Prabakar
pavel.myshkin

Joined: 19/12/2008 00:00:00
Messages: 5
Offline


You can have a detailed solution for content assistance with JSF, Facelets and similar here - http://blog.javarnd.com/?p=11
laura.vigna


Joined: 31/08/2009 00:00:00
Messages: 30
Offline


Hey thanks!!! I tried now the workaround on Eclipse Galileo 3.5 and it works for me (autocompletion for .xhtml)
cheers
laura

"Fatti non foste a viver come bruti, ma a seguir virtute e conoscenza"
 
Forum Index -> Tools Go to Page: Previous  1, 2, 3 Next 
Go to:   
Powered by JForum 2.1.7ice © JForum Team