dev@jsf-extensions.java.net

Re: [JSF-EXT] Who has the right to load a script?

From: Ed Burns <ed.burns_at_sun.com>
Date: Fri, 2 Jun 2006 07:54:34 -0700

>>>>> On Fri, 02 Jun 2006 07:43:36 -0700, Ed Burns <Ed.Burns_at_Sun.COM> said:

EB> However, Shale Remoting already has something very close to what we need
EB> in the form of the XhtmlHelper.linkJavascript() method [1]. We just
EB> need some pre-defined resourceIds for each of the libraries. We
EB> probably also want the scheme to be version aware.

In related news:

I mentioned this in the migration wiki [1]:

  ISSUE: Jacob has hard-coded references to scripts in his <head>
  section. I don't want to require users to do this. The requirement
  to manually put this in the <head> contradicts our claim that "all you
  have to do is add onclick='new Faces.Event()' to an existing
  commandButton and you have AJAXified your page". This claim is not
  true because you also have to put these hard-coded script elements in
  your <head> section:

This is one of the advantage of using specific ajax components: the
component knows what scripts it needs, and can render the appropriate
<script> elements. However, I like the idea of not requiring any
ajaxZone components, as shown in Jacob's demo. A middle ground would be
to have a jsf component that renders the required script elements.

I'll try out this approach and see how it goes.

Ed


[1] http://wiki.java.net/bin/view/Projects/MigratingFaceletsBranchToJsfExt

-- 
| ed.burns_at_sun.com  | {home: 407 869 9587, office: 408 884 9519 OR x31640}
| homepage:         | http://purl.oclc.org/NET/edburns/
| aim: edburns0sunw | iim: ed.burns_at_sun.com