dev@javaserverfaces.java.net

RE: [REVIEW] [324-Ajax Resource Loading] Proposal [Part 1][createAjaxResource]

From: Kito D. Mann <kmann_at_virtua.com>
Date: Mon, 14 Jul 2008 13:50:29 -0400

Hey Roger,

This looks good to me. However, shouldn't the library name (and maybe even
then namespace) be constants?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Kito D. Mann - Author, JavaServer Faces in Action
http://www.virtua.com - JSF/Java EE consulting, training, and mentoring
http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info
phone: +1 203-653-2989
fax: +1 203-653-2988


> -----Original Message-----
> From: Roger.Kitain_at_Sun.COM [mailto:Roger.Kitain_at_Sun.COM]
> Sent: Monday, July 14, 2008 12:46 PM
> To: dev_at_javaserverfaces.dev.java.net
> Subject: [REVIEW] [324-Ajax Resource Loading] Proposal [Part
> 1][createAjaxResource]
>
> Per EG's latest request, please review the changes for the additional
> ResourceHandler.createAjaxResource method:
>
> M 5035 jsf-
> api/src/javax/faces/application/ResourceHandler.java
> --- Add createAjaxResource() that will create the Ajax resource with name
> --- "ajax.js" in library "javax.faces"
> M 5035
> jsf-api/src/javax/faces/application/ResourceHandlerWrapper.java
> --- Add createAjaxResource() (calls through to
> ResourceHandler.createAjaxResource()
> M 5035
> jsf-
> ri/test/com/sun/faces/application/resource/TestResourceHandlerImpl.java
> --- test case
> M 5035
> jsf-ri/src/com/sun/faces/application/resource/ResourceHandlerImpl.java
> --- implementation
>
>
>
> Kito D. Mann wrote:
> > After reviewing the EDR spec, I think we should give the Ajax
> integration
> > library special support. So, I propose the following (all of this refers
> to
> > ...
> >
> > 2. Provide a convenience method on ResourceHanlder so that a developer
> can
> > write t his:
> >
> > Resource resource = context.getApplication().getResourceHandler()
> > .createAjaxResource();
> >
> > Instead of this:
> >
> > Resource resource = context.getApplication().getResourceHandler()
> > .createResource("ajax.js", "javax.faces");
> >
> >