dev@jsf-extensions.java.net

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

From: Jacob Hookom <jacob_at_hookom.net>
Date: Fri, 02 Jun 2006 10:04:36 -0500

The demo did use examples of resource loading for javax.faces.js and the
associated com.enverio.js:

1) Convention of anything in FACES-INF is public from the
classloader/jar and remotely referenceable (javax.faces.js)

2) The AutoSuggest example uses the ClientWriter.writeScript(....)
method to do the same thing as Weblets/Shale.

There's a lot of solutions floating around for static loading from the
classloader and Weblets allows you to mount Servlet-like endpoints for
dynamic content delivery from the classloader. This is the obvious next
step from the 4 or 5 solutions out there for pure static resource
delivery. Ajax4Jsf says they have a solution for dynamic resource
delivery from the classloader too.

Ed Burns wrote:
>>>>>> 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
>
>


-- 
--------------------------
Sent from my FrankenBerry Wireless Handheld