You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Juergen Melzer <my...@hotmail.de> on 2006/01/13 15:51:26 UTC
Why is AddResource not usable outside myFaces?
Hi,
I want to use the mechanism like myFaces to load javascript resources.
I use the class org.apache.myfaces.component.html.util.AddResource.
But when I want to use it I found in 1.1.1:
"For security reasons, only components member of the
org.apache.myfaces.custom are allowed to add ressources"
In 1.1.x:
"expected a myfaces custom component class in package
org.apache.myfaces.custom"
Is there is a reason to do this?
Regards,
Juergen
_________________________________________________________________
Sie suchen E-Mails, Dokumente oder Fotos? Die neue MSN Suche Toolbar mit
Windows-Desktopsuche liefert in sekundenschnelle Ergebnisse. Jetzt neu!
http://desktop.msn.de/ Jetzt gratis downloaden!
Re: Why is AddResource not usable outside myFaces?
Posted by Pierpaolo Follia <pi...@wavegroup.it>.
I'd like to know it too. I have had to duplicate that class to use the
same feature for my components...
Bye
Juergen Melzer wrote:
> Hi,
>
> I want to use the mechanism like myFaces to load javascript resources.
> I use the class org.apache.myfaces.component.html.util.AddResource.
> But when I want to use it I found in 1.1.1:
> "For security reasons, only components member of the
> org.apache.myfaces.custom are allowed to add ressources"
> In 1.1.x:
> "expected a myfaces custom component class in package
> org.apache.myfaces.custom"
>
> Is there is a reason to do this?
>
> Regards,
> Juergen
>
> _________________________________________________________________
> Sie suchen E-Mails, Dokumente oder Fotos? Die neue MSN Suche Toolbar
> mit Windows-Desktopsuche liefert in sekundenschnelle Ergebnisse. Jetzt
> neu! http://desktop.msn.de/ Jetzt gratis downloaden!
>
--
Pierpaolo Follia
Wave S.r.l. - Vai Benaco 24/B, Bedizzole (BS)
Telefono: +39 030 687561
Fax: +39 030 6875690
Re: Why is AddResource not usable outside myFaces?
Posted by John Fallows <jo...@gmail.com>.
On 1/13/06, Simon Kitching <sk...@apache.org> wrote:
>
> On Fri, 2006-01-13 at 15:51 +0100, Juergen Melzer wrote:
> > Hi,
> >
> > I want to use the mechanism like myFaces to load javascript resources.
> > I use the class org.apache.myfaces.component.html.util.AddResource.
> > But when I want to use it I found in 1.1.1:
> > "For security reasons, only components member of the
> > org.apache.myfaces.custom are allowed to add ressources"
> > In 1.1.x:
> > "expected a myfaces custom component class in package
> > org.apache.myfaces.custom"
> >
> > Is there is a reason to do this?
>
> The SVN current version of AddResource allows non-faces classes to serve
> resources from jars. However this functionality is NOT available in the
> 1.1.1 release.
>
> There are some steps needed to enable non-faces code to use AddResource;
> I haven't done this myself so I'm not entirely sure but I think it
> involves writing your own (trivial) ResourceHandler class.
>
>
You might also want to consider the Apache-2.0 licensed Weblets project to
meet this requirement.
http://weblets.dev.java.net
Kind Regards,
John Fallows.
--
Author Pro JSF and Ajax: Building Rich Internet Components
http://www.apress.com/book/bookDisplay.html?bID=10044
Re: Why is AddResource not usable outside myFaces?
Posted by Simon Kitching <sk...@apache.org>.
On Fri, 2006-01-13 at 15:51 +0100, Juergen Melzer wrote:
> Hi,
>
> I want to use the mechanism like myFaces to load javascript resources.
> I use the class org.apache.myfaces.component.html.util.AddResource.
> But when I want to use it I found in 1.1.1:
> "For security reasons, only components member of the
> org.apache.myfaces.custom are allowed to add ressources"
> In 1.1.x:
> "expected a myfaces custom component class in package
> org.apache.myfaces.custom"
>
> Is there is a reason to do this?
The SVN current version of AddResource allows non-faces classes to serve
resources from jars. However this functionality is NOT available in the
1.1.1 release.
There are some steps needed to enable non-faces code to use AddResource;
I haven't done this myself so I'm not entirely sure but I think it
involves writing your own (trivial) ResourceHandler class.
Regards,
Simon