myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Werner Punz <>
Subject Re: javascript error "jsf is not defined"
Date Wed, 07 Apr 2010 16:36:05 GMT
Actually afaik you still need a faces-config, but in many cases it can 
be left blank or you just have a few lines of xml because you wont have 
too many artifacts anymore which still
need xml registration. Most of the day to day stuff is now annotations.
But there are exceptions, which is a little bit annoying.


Am 07.04.10 13:56, schrieb Matthias Leis:
> You are right about the view handler. I forgot that JSF2 doesn't need afaces-config anymore.
But I need it anyway for registering a phase listener. Anyway, if I remove the view handler
from the faces-config, all I get from my webapp is a blank page and no errors. Do I have to
define a view-handler if I use a faces-config file or does JSF just use the dafault view handler?
> -------- Original-Nachricht --------
>> Datum: Wed, 07 Apr 2010 08:54:02 +0200
>> Von: Werner Punz<>
>> An:
>> Betreff: Re: javascript error "jsf is not defined"
>> Am 07.04.10 08:14, schrieb Matthias Leis:
>>> Hi Jakob,
>>> I guess I use the built-in facelets. At least this is the code from
>> faces-config:
>>> <view-handler>
>>>         com.sun.facelets.FaceletViewHandler
>>> </view-handler>
>> Wrong view handler... the jsf2 one is not under com.sun, but under
>> javax.faces.view.facelets and it is initialized automatically if you use
>> myfaces and the jsf2 facelets (no further configuration is needed)
>> Com sun is the old Facelet 1.x stuff and the new tags cannot work under
>> it due to the extensions in the jsf2 lifecycle and view handler api.
>> So it is either old facelets or the jsf2 one but not a mix of both, sort
>> of a hard break introduced by the namespace change from com.sun into
>> javax.facelets and due to the api changes, but better once a hard break
>> from old habits than having endless pain :-)
>> Basically if you run in a pure jsf2 environment you can start to use
>> facelets without additional configuration on the faces-config side.
>> Werner

View raw message