myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jakob Korherr <jakob.korh...@gmail.com>
Subject Re: javascript error "jsf is not defined"
Date Thu, 01 Apr 2010 17:53:11 GMT
Hi Matthias,

Are you using the built-in facelets or are you using facelets-1.1.x?

You're welcome! I'm glad I could help.

Danke - ebenfalls fröhliche Ostern :)

Jakob

2010/4/1 Matthias Leis <matthias.leis@gmx.net>

> Hi Jakob,
>
> I'm already using Facelets (and MyFaces 2.0).
> I have no clue, why h:outputScript shouldn't be defined... anyway, I
> imported the script as you suggested and it works perfectly! Many thanks and
> happy Easter! (oder einfach fröhliche Ostern! ;) )
> -------- Original-Nachricht --------
> > Datum: Thu, 1 Apr 2010 14:16:04 +0200
> > Von: Jakob Korherr <jakob.korherr@gmail.com>
> > An: MyFaces Discussion <users@myfaces.apache.org>
> > Betreff: Re: javascript error "jsf is not defined"
>
> > Hi Matthias,
> >
> > You're using MyFaces 2.0 and JSP, right?
> >
> > The problem is that h:outputScript only works for facelets and not for
> > JSP.
> > I would recommend that you use facelets instead of JSP, because in JSF
> 2.0
> > JSP is seen as a legacy technology which does not include many of the new
> > features. Furthermore it is easy to change!
> >
> > If you do want to use JSP, you will have to include the script directly
> > rather than using h:outputScript. This will look something like this:
> >
> > <script type="text/javascript"
> >
> src="/test-webapp/javax.faces.resource/jsf.js.jsf?ln=javax.faces"></script>
> >
> > But note that my application prefix is "test-webapp" and my used mapping
> > is
> > *.jsf - I guess you will have to change those settings!
> >
> > Regards,
> > Jakob
> >
> >
> > 2010/4/1 Matthias Leis <matthias.leis@gmx.net>
> >
> > > Hi Jakob,
> > >
> > > thanks for your quick reply. I tried
> > > <h:outputScript name="jsf.js" library="javax.faces" target="head"/>
> > > and I get
> > > Tag Library supports namespace: http://java.sun.com/jsf/html, but no
> tag
> > > was defined for name: outputScript
> > >
> > > I know, that outputScript is defined, but how to tell it JSF? ;) How to
> > > update my taglib?
> > >
> > > I'm almost sorry for this question :(
> > >
> > > Thanks!
> > > -------- Original-Nachricht --------
> > > > Datum: Thu, 1 Apr 2010 11:48:06 +0200
> > > > Von: Jakob Korherr <jakob.korherr@gmail.com>
> > > > An: MyFaces Discussion <users@myfaces.apache.org>
> > > > Betreff: Re: javascript error "jsf is not defined"
> > >
> > > > Hi Matthias,
> > > >
> > > > If you have some javascript in onclick we have to use the
> > > jsf.util.chain()
> > > > function to chain your javascript with the MyFaces javascript. For
> > that
> > > to
> > > > work we need the JSF javascript library in the view. This include
> > > _should_
> > > > happen automatically, but it seems that it does not.
> > > >
> > > > I'll take a look at this one! For now you can include the following
> in
> > > > your
> > > > view to include the JSF javascript library manually and thus to make
> > it
> > > > work:
> > > >
> > > > <h:outputScript name="jsf.js" library="javax.faces" target="head"/>
> > > >
> > > > Regards,
> > > > Jakob
> > > >
> > > > 2010/4/1 Matthias Leis <matthias.leis@gmx.net>
> > > >
> > > > > Hi,
> > > > >
> > > > > I have this piece of code:
> > > > > <h:commandLink value="#{msg.adminPageLogFileTableDelete}"
> > > > > action="#{adminPage.deleteLogFile}" onclick="confirm('Are you
> > > sure?')"/>
> > > > >
> > > > > When I click the link, I get an JavaScript error: jsf is not
> defined
> > > > >
> > > > > What does this mean?
> > > > >
> > > > > I am using myfaces 2.0.0-beta-3
> > > > >
> > > > > Any help is appreciated :)
> > > > > --
> > > > > GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
> > > > > Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
> > > > >
> > >
> > > --
> > > Sicherer, schneller und einfacher. Die aktuellen Internet-Browser -
> > > jetzt kostenlos herunterladen! http://portal.gmx.net/de/go/atbrowser
> > >
>
> --
> GMX.at - Österreichs FreeMail-Dienst mit über 2 Mio Mitgliedern
> E-Mail, SMS & mehr! Kostenlos: http://portal.gmx.net/de/go/atfreemail
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message