2

recently I was working in a JSF project and a popup poped (lol), my ignorance told me to ignore it and check "Dont ask again" (didnt read it, now I regret it... is there a way I can make the little popup to appear again?), now I cant use autocomplete in the xhtml files, that include html tags and bean tags.

I have tried almost everything:

  • Window > Preferences > General > Content Types > Text > JSP > Add (xhtml) -> Done, still not working.
  • Right click on the project -> Preferences -> Project Facets -> Click on "JavaServer Faces", version should most probably be 2.0. -> Also done, still not working.

What I still havent do, is this: http://www.mkyong.com/jsf2/eclipse-ide-xhtml-code-assist-is-not-working-for-jsf-tag/

Since I dont get the "Further configuration avalaible..." link.

Im Using Eclipse Indigo Service Release 2 with JSF 2.1 I believe.

Also, I have other project in which the autocomplete features are working properly.

Would appreciate any help, since this is driving me crazy.

Thanks in advance!

EDIT: These are my xhtml headers:

template="../../template/template-operaciones.xhtml"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"

Also, just tried in eclipse, in the project where autocomplete is working, just as I pressed the "." a popup with a progress bar with the text "Building JSF or JSP Model"... if I remember correctly that was the popup which I ignored before, something about JSF Model which I didnt build in the project that it is not working.

Moko
  • 441
  • 4
  • 9
  • 15
  • Close the project and re-open it. I think it would do the trick. – vicky Jan 29 '13 at 08:03
  • Are you declaring the namespaces properly? `xmlns:f="http://java.sun.com/jsf/core"` `xmlns:h="http://java.sun.com/jsf/html"`... – Aritz Jan 29 '13 at 09:42
  • 1
    **Add (xhtml) -> Done, still not working.** Is it also at the top of the list ? If not it may still be opening in another editor. Also try this: Eclipse properties -> File Associations -> *.xhtml -> Put JSP Editor on top. Please also show us your .xhtml page header. – Christophe Roussy Jan 29 '13 at 10:25
  • Not sure about your current problem, setting the right project facet should already do it, but you should at least certainly not add `.xhtml` to the JSP editor. This is a leftover of JSF 1.x era when Eclipse didn't had builtin Facelets support. I'd undo that step to be sure. As to the little popup, I'm not sure what you're talking about, but perhaps you mean that Eclipse asked you to view it in Java EE perspective and that you declined it? You can re-choose it by *Window > Open Perspective*. Although that shouldn't break Facelets support. At least, it didn't for me here in Indigo SR2. – BalusC Jan 29 '13 at 11:30
  • Thanks all for answering. Edited the OP with "new" information. – Moko Jan 29 '13 at 23:24
  • @ChristopheRoussy Tried that, unfortunately still not working. – Moko Jan 29 '13 at 23:32
  • @BalusC I edited op with that. But IIRC it was about building the JSF Model on that project, which I ignored. – Moko Jan 29 '13 at 23:33
  • I just remembered what was the popup about. The title was Missing Natures, and it was about "Buldinb JSF autocompletion code", something like that, it was asking me about building that for that project... but I ignored it... – Moko Feb 01 '13 at 07:40

1 Answers1

0

Had the same problem and tried the same you did and it didn't help. This solved for me:

Go to project Properties> Java Build Path > Add Library > Select User Library > User Libraries > New > (give it whatever name you want) > Add External JAR > Add the JAR you want (like primefaces-3.5.jar)