tags:

views:

19

answers:

1

Hi guys,

I use workshop 10.3 to develop my application and I would like to know how I can configure it to have autocompletion in jsf file.

Workshop has autocompletion in jsp file but my file extension is xhtml and with this extension, I can't have autocompletion.

Thanks for your help.

A: 

I don't use Oracle Workshop, but since it's Eclipse based I think an Eclipse targeted answer is also fine: go to Window > Preferences > General > Content Types > Text > JSP and then add *.xhtml as file association (and of course set default encoding to UTF-8). This will get you autocompletion for the JSF taglibs.

Autocompletion of Facelets taglib is however another story. It by default doesn't use TLD files to define the tags. The current Eclipse Helios 3.6 version supports it, but in older Eclipse versions you'll have to bring in a TLD or do some hacky stuff. Also see this answer.

BalusC
I tried your solution, I get jsp completion but I don't have completion for element like this:<ui:composition xmlns="http://www.w3.org/1999/xhtml" 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:s="http://jboss.com/products/seam/taglib" template="/layout/template.xhtml">
Kiva
Visibly, this doesn't work with workshop.
Kiva