how to see docs for jsf/facelets elements in eclipse
Asked Answered
C

1

4

I am using helios 3.6.2. I have an .xhtml opened with Web Page Editor

<!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:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      >
<f:view>
<h:head>
...
</h:head>

when ever I hover over an element,e.g. f:view, I only see :

Element : f:view

rather than the description which suppose to be the following according to the tld:

Creates a JSF View, which is a container that holds all of the components that are part of the view.

Unless otherwise specified, all attributes accept static values or EL expressions.

See the javadoc for this class in the JSF Specification for further details.

Is there anyway I can configure the eclipse to do that?

Chalco answered 1/6, 2011 at 16:50 Comment(0)
P
5

That depends on plugins used. Current Eclipse version (Helios) indeed doesn't support this out the box (update: this is definitely supported since Kepler which is the first Eclipse version with builtin JSF 2.0 support).

When you're using for example Glassfish 3 and use the Glassfish server plugin and the project has Glassfish set as target runtime, then you'll see autocompletion and documentation for all tags and attributes in the Facelet XHTML page. You will even get an extra rightclick menu option on the project New > XHTML file.

Here are some screens of a Eclipse+Glassfish project:


Tag tooltip:

tag tooltip


Tag autocompletion:

tag autocompletion


Attribute autocompletion:

attribute autocompletion


When using for example Tomcat as target runtime, this feature is not available. Even more, syntax highlighting doesn't work at all. You would have to manually add *.xhtml extension to JSP editor settings to get the highlighting to work by Window > Preferences > General > Content Types > Text > JSP. But that's it.

For JBoss AS 6 you need the JBoss Tools plugin which can be installed as described here. This plugin by the way unfortunately doesn't work out for Tomcat.

Piecedyed answered 1/6, 2011 at 17:2 Comment(1)
Too bad that we can't get what Glassfish users can get out of eclipse.. :(Chalco

© 2022 - 2024 — McMap. All rights reserved.