You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Hendrik Neumann <he...@web.de> on 2005/04/02 16:57:31 UTC

MyFaces-Ressource-Loader not working in my webapp

Hi everybody,

whenever I try to add special MyFaces-Extensions like tree2 or JS-popup-window 
etc. to my web-app I need to implement the java-script code which belongs to 
this extension into my html-header myself. 

I.e. if I want to use your pop-up-menu-tags (<x:popup />) in a specific 
JSF-Page I need to add the line 

	<script type="text/javascript" src="../files/javascript/JSPopup.js"></script>

which contains your java-script code for the pop-up component.

But after analyzing your example-webapp I recognize that you don't do this. 
Your web-app seems to add the needed resources when they are needed, but this 
is not working in my web-app. Also the images for tree2 (the lines which are 
connecting the folders and the documents which each other etc.) are missing.

How can I get this feature to work?

P.S: will this mail-list be reneamed in the future (because 
incubator.apache.org is old)?

Greetings,
Hendrik

Re: x:popup - no popup!

Posted by Patrick B Haggood <co...@email.com>.
That did it; thanks!

On Fri, 2005-05-06 at 14:43 +0200, Csík Norbert wrote:
> But the popup uses /faces/ url mapping to access the necessary
> javascript code. So the ExtensionsFilter needs the /faces/* mapping
> too.
> 
> On 5/6/05, Patrick B Haggood <co...@email.com> wrote:
> > On Tue, 2005-05-03 at 21:40 -0400, Sylvain Vieujot wrote:
> > > You didn't add the /faces/* mapping for the extensions filter :
> > > <filter-mapping>
> > >       <filter-name>MyFacesExtensionsFilter</filter-name>
> > >       <url-pattern>/faces/*</url-pattern>
> > > </filter-mapping>
> > 
> > Yes, I did (I use *.faces, not /faces/*)
> > (from my previous email)



Re: x:popup - no popup!

Posted by Csík Norbert <no...@gmail.com>.
But the popup uses /faces/ url mapping to access the necessary
javascript code. So the ExtensionsFilter needs the /faces/* mapping
too.

On 5/6/05, Patrick B Haggood <co...@email.com> wrote:
> On Tue, 2005-05-03 at 21:40 -0400, Sylvain Vieujot wrote:
> > You didn't add the /faces/* mapping for the extensions filter :
> > <filter-mapping>
> >       <filter-name>MyFacesExtensionsFilter</filter-name>
> >       <url-pattern>/faces/*</url-pattern>
> > </filter-mapping>
> 
> Yes, I did (I use *.faces, not /faces/*)
> (from my previous email)
> 
>         <filter-mapping>
>                 <filter-name>extensionsFilter</filter-name>
>                 <url-pattern>*.faces</url-pattern>
>         </filter-mapping>
> 
> >
> > Look here :http://myfaces.apache.org/docs/extensionsFilter.html
> >
> > On Tue, 2005-05-03 at 21:34 -0400, Patrick B Haggood wrote:
> > > Ttrying to use x:popup, no popup on hover.  Already added
> > > extensionsfilter to web.xml for upload (which works).
> > >
> > > My popup:
> > >
> > > <h:column id="fc1">
> > >     <x:popup styleClass="popup">
> > >     <h:graphicImage id="pic" value="img/document.gif" />
> > >     <f:facet name="popup">
> > >             <h:panelGroup>
> > >                     <h:panelGrid columns="1">
> > >                             <h:outputLink value="openAction">
> > >                             <h:outputText value="Open" />
> > >                             </h:outputLink>
> > >                             <h:outputLink value="copyAction">
> > >                             <h:outputText value="Copy" />
> > >                             </h:outputLink>
> > >                             <h:outputLink value="deleteAction">
> > >                             <h:outputText value="Delete" />
> > >                             </h:outputLink>
> > >                             <h:outputLink value="modifyAction">
> > >                             <h:outputText value="Modify" />
> > >                             </h:outputLink>
> > >                     </h:panelGrid>
> > >             </h:panelGroup>
> > >     </f:facet>
> > >     </x:popup>
> > >     <h:outputText value="#{litem.name}" />
> > > </h:column>
> > >
> > > Excerpt from my web.xml, copied from myfaces-examples:
> > >
> > >
> > >     <!-- Extensions Filter -->
> > >     <filter>
> > >             <filter-name>extensionsFilter</filter-name>
> > >             <filter-class>
> > >                     org.apache.myfaces.component.html.util.ExtensionsFilter
> > >             </filter-class>
> > >             <init-param>
> > >                     <param-name>uploadMaxFileSize</param-name>
> > >                     <param-value>100m</param-value>
> > >                     <description>
> > >                             Set the size limit for uploaded files. Format: 10 - 10
> > >                             bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB
> > >                     </description>
> > >             </init-param>
> > >             <init-param>
> > >                     <param-name>uploadThresholdSize</param-name>
> > >                     <param-value>100k</param-value>
> > >                     <description>
> > >                             Set the threshold size - files below this limit are
> > >                             stored in memory, files above this limit are stored on
> > >                             disk.
> > >
> > >                             Format: 10 - 10 bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB
> > >                     </description>
> > >             </init-param>
> > >             <!--        <init-param>
> > >                     <param-name>uploadRepositoryPath</param-name>
> > >                     <param-value>/temp</param-value>
> > >                     <description>Set the path where the intermediary files will be
> > > stored.
> > >                     </description>
> > >                     </init-param>-->
> > >     </filter>
> > >
> > >
> > >     <!-- Filter Mappings -->
> > >
> > >     <!--    <filter-mapping>-->
> > >     <!--        <filter-name>javascriptDetector</filter-name>-->
> > >     <!--        <url-pattern>/_javascriptDetector_</url-pattern>-->
> > >     <!--    </filter-mapping>-->
> > >
> > >
> > >
> > >     <filter-mapping>
> > >             <filter-name>extensionsFilter</filter-name>
> > >             <url-pattern>*.faces</url-pattern>
> > >     </filter-mapping>
> > >
> > >
> > > On Sat, 2005-04-02 at 10:15 -0500, Rob Decker wrote:
> > > > There is an extensionFilter (it's the one for fileupload) that you need to
> > > > set up in  your web.xml. The filter and filter-mapping for it are commented
> > > > out by default.
> > > >
> > > > Rob
> > >
> > >
> 
> 


-- 
 Csík Norbert          http://norbert.web.elte.hu/
 Programtervező matematikus
 Trilobita Informatikai Rt. - rendszertervező fejlesztőmérnök
___ keep sm:)ing _________________________ooo__C( O O )L__ooo__
http://www.aion.hu/ - A csik.NET otthona
http://www.spreadfirefox.com/ - Rediscover the web
Légy pontos: Mérj mikro-milliméterben! Jelölj krétával! Vágj baltával!

Re: x:popup - no popup!

Posted by Patrick B Haggood <co...@email.com>.
On Tue, 2005-05-03 at 21:40 -0400, Sylvain Vieujot wrote:
> You didn't add the /faces/* mapping for the extensions filter :
> <filter-mapping> 
> 	<filter-name>MyFacesExtensionsFilter</filter-name>
> 	<url-pattern>/faces/*</url-pattern>
> </filter-mapping>

Yes, I did (I use *.faces, not /faces/*)
(from my previous email)

        <filter-mapping>
                <filter-name>extensionsFilter</filter-name>
                <url-pattern>*.faces</url-pattern>
        </filter-mapping>

> 
> Look here :http://myfaces.apache.org/docs/extensionsFilter.html
> 
> On Tue, 2005-05-03 at 21:34 -0400, Patrick B Haggood wrote:
> > Ttrying to use x:popup, no popup on hover.  Already added
> > extensionsfilter to web.xml for upload (which works).  
> > 
> > My popup:
> > 
> > <h:column id="fc1">
> > 	<x:popup styleClass="popup">
> > 	<h:graphicImage id="pic" value="img/document.gif" />
> > 	<f:facet name="popup">
> > 		<h:panelGroup>
> > 			<h:panelGrid columns="1">
> > 				<h:outputLink value="openAction">
> > 				<h:outputText value="Open" />
> > 				</h:outputLink>
> > 				<h:outputLink value="copyAction">
> > 				<h:outputText value="Copy" />
> > 				</h:outputLink>
> > 				<h:outputLink value="deleteAction">
> > 				<h:outputText value="Delete" />
> > 				</h:outputLink>
> > 				<h:outputLink value="modifyAction">
> > 				<h:outputText value="Modify" />
> > 				</h:outputLink>
> > 			</h:panelGrid>
> > 		</h:panelGroup>
> > 	</f:facet>
> > 	</x:popup>
> > 	<h:outputText value="#{litem.name}" />
> > </h:column>
> > 
> > Excerpt from my web.xml, copied from myfaces-examples:
> > 
> > 
> > 	<!-- Extensions Filter -->
> > 	<filter>
> > 		<filter-name>extensionsFilter</filter-name>
> > 		<filter-class>
> > 			org.apache.myfaces.component.html.util.ExtensionsFilter
> > 		</filter-class>
> > 		<init-param>
> > 			<param-name>uploadMaxFileSize</param-name>
> > 			<param-value>100m</param-value>
> > 			<description>
> > 				Set the size limit for uploaded files. Format: 10 - 10
> > 				bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB
> > 			</description>
> > 		</init-param>
> > 		<init-param>
> > 			<param-name>uploadThresholdSize</param-name>
> > 			<param-value>100k</param-value>
> > 			<description>
> > 				Set the threshold size - files below this limit are
> > 				stored in memory, files above this limit are stored on
> > 				disk.
> > 
> > 				Format: 10 - 10 bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB
> > 			</description>
> > 		</init-param>
> > 		<!--        <init-param>
> > 			<param-name>uploadRepositoryPath</param-name>
> > 			<param-value>/temp</param-value>
> > 			<description>Set the path where the intermediary files will be
> > stored.
> > 			</description>
> > 			</init-param>-->
> > 	</filter>
> > 
> > 
> > 	<!-- Filter Mappings -->
> > 
> > 	<!--    <filter-mapping>-->
> > 	<!--        <filter-name>javascriptDetector</filter-name>-->
> > 	<!--        <url-pattern>/_javascriptDetector_</url-pattern>-->
> > 	<!--    </filter-mapping>-->
> > 
> > 
> > 
> > 	<filter-mapping>
> > 		<filter-name>extensionsFilter</filter-name>
> > 		<url-pattern>*.faces</url-pattern>
> > 	</filter-mapping>
> > 
> > 
> > On Sat, 2005-04-02 at 10:15 -0500, Rob Decker wrote:
> > > There is an extensionFilter (it's the one for fileupload) that you need to
> > > set up in  your web.xml. The filter and filter-mapping for it are commented
> > > out by default.
> > > 
> > > Rob
> > 
> > 


Re: x:popup - no popup!

Posted by Sylvain Vieujot <sv...@apache.org>.
You didn't add the /faces/* mapping for the extensions filter :
<filter-mapping>

	<filter-name>MyFacesExtensionsFilter</filter-name>
	<url-pattern>/faces/*</url-pattern>
</filter-mapping>


Look here :http://myfaces.apache.org/docs/extensionsFilter.html


On Tue, 2005-05-03 at 21:34 -0400, Patrick B Haggood wrote:

> Ttrying to use x:popup, no popup on hover.  Already added
> extensionsfilter to web.xml for upload (which works).  
> 
> My popup:
> 
> <h:column id="fc1">
> 	<x:popup styleClass="popup">
> 	<h:graphicImage id="pic" value="img/document.gif" />
> 	<f:facet name="popup">
> 		<h:panelGroup>
> 			<h:panelGrid columns="1">
> 				<h:outputLink value="openAction">
> 				<h:outputText value="Open" />
> 				</h:outputLink>
> 				<h:outputLink value="copyAction">
> 				<h:outputText value="Copy" />
> 				</h:outputLink>
> 				<h:outputLink value="deleteAction">
> 				<h:outputText value="Delete" />
> 				</h:outputLink>
> 				<h:outputLink value="modifyAction">
> 				<h:outputText value="Modify" />
> 				</h:outputLink>
> 			</h:panelGrid>
> 		</h:panelGroup>
> 	</f:facet>
> 	</x:popup>
> 	<h:outputText value="#{litem.name}" />
> </h:column>
> 
> Excerpt from my web.xml, copied from myfaces-examples:
> 
> 
> 	<!-- Extensions Filter -->
> 	<filter>
> 		<filter-name>extensionsFilter</filter-name>
> 		<filter-class>
> 			org.apache.myfaces.component.html.util.ExtensionsFilter
> 		</filter-class>
> 		<init-param>
> 			<param-name>uploadMaxFileSize</param-name>
> 			<param-value>100m</param-value>
> 			<description>
> 				Set the size limit for uploaded files. Format: 10 - 10
> 				bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB
> 			</description>
> 		</init-param>
> 		<init-param>
> 			<param-name>uploadThresholdSize</param-name>
> 			<param-value>100k</param-value>
> 			<description>
> 				Set the threshold size - files below this limit are
> 				stored in memory, files above this limit are stored on
> 				disk.
> 
> 				Format: 10 - 10 bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB
> 			</description>
> 		</init-param>
> 		<!--        <init-param>
> 			<param-name>uploadRepositoryPath</param-name>
> 			<param-value>/temp</param-value>
> 			<description>Set the path where the intermediary files will be
> stored.
> 			</description>
> 			</init-param>-->
> 	</filter>
> 
> 
> 	<!-- Filter Mappings -->
> 
> 	<!--    <filter-mapping>-->
> 	<!--        <filter-name>javascriptDetector</filter-name>-->
> 	<!--        <url-pattern>/_javascriptDetector_</url-pattern>-->
> 	<!--    </filter-mapping>-->
> 
> 
> 
> 	<filter-mapping>
> 		<filter-name>extensionsFilter</filter-name>
> 		<url-pattern>*.faces</url-pattern>
> 	</filter-mapping>
> 
> 
> On Sat, 2005-04-02 at 10:15 -0500, Rob Decker wrote:
> > There is an extensionFilter (it's the one for fileupload) that you need to
> > set up in  your web.xml. The filter and filter-mapping for it are commented
> > out by default.
> > 
> > Rob
> 
> 

x:popup - no popup!

Posted by Patrick B Haggood <co...@email.com>.
Ttrying to use x:popup, no popup on hover.  Already added
extensionsfilter to web.xml for upload (which works).  

My popup:

<h:column id="fc1">
	<x:popup styleClass="popup">
	<h:graphicImage id="pic" value="img/document.gif" />
	<f:facet name="popup">
		<h:panelGroup>
			<h:panelGrid columns="1">
				<h:outputLink value="openAction">
				<h:outputText value="Open" />
				</h:outputLink>
				<h:outputLink value="copyAction">
				<h:outputText value="Copy" />
				</h:outputLink>
				<h:outputLink value="deleteAction">
				<h:outputText value="Delete" />
				</h:outputLink>
				<h:outputLink value="modifyAction">
				<h:outputText value="Modify" />
				</h:outputLink>
			</h:panelGrid>
		</h:panelGroup>
	</f:facet>
	</x:popup>
	<h:outputText value="#{litem.name}" />
</h:column>

Excerpt from my web.xml, copied from myfaces-examples:


	<!-- Extensions Filter -->
	<filter>
		<filter-name>extensionsFilter</filter-name>
		<filter-class>
			org.apache.myfaces.component.html.util.ExtensionsFilter
		</filter-class>
		<init-param>
			<param-name>uploadMaxFileSize</param-name>
			<param-value>100m</param-value>
			<description>
				Set the size limit for uploaded files. Format: 10 - 10
				bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB
			</description>
		</init-param>
		<init-param>
			<param-name>uploadThresholdSize</param-name>
			<param-value>100k</param-value>
			<description>
				Set the threshold size - files below this limit are
				stored in memory, files above this limit are stored on
				disk.

				Format: 10 - 10 bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB
			</description>
		</init-param>
		<!--        <init-param>
			<param-name>uploadRepositoryPath</param-name>
			<param-value>/temp</param-value>
			<description>Set the path where the intermediary files will be
stored.
			</description>
			</init-param>-->
	</filter>


	<!-- Filter Mappings -->

	<!--    <filter-mapping>-->
	<!--        <filter-name>javascriptDetector</filter-name>-->
	<!--        <url-pattern>/_javascriptDetector_</url-pattern>-->
	<!--    </filter-mapping>-->



	<filter-mapping>
		<filter-name>extensionsFilter</filter-name>
		<url-pattern>*.faces</url-pattern>
	</filter-mapping>


On Sat, 2005-04-02 at 10:15 -0500, Rob Decker wrote:
> There is an extensionFilter (it's the one for fileupload) that you need to
> set up in  your web.xml. The filter and filter-mapping for it are commented
> out by default.
> 
> Rob



Re: MyFaces-Ressource-Loader not working in my webapp

Posted by Hendrik Neumann <he...@web.de>.
great  - thank you very much, that did it :)

Am Samstag, 2. April 2005 17:15 schrieb Rob Decker:
> set up in  your web.xml. The filter and filter-mapping for it are commented
> out by default.

Re: MyFaces-Ressource-Loader not working in my webapp

Posted by Rob Decker <ro...@objectsource.org>.
There is an extensionFilter (it's the one for fileupload) that you need to
set up in  your web.xml. The filter and filter-mapping for it are commented
out by default.

Rob

----- Original Message ----- 
From: "Hendrik Neumann" <he...@web.de>
To: <my...@incubator.apache.org>
Sent: Saturday, April 02, 2005 9:57 AM
Subject: MyFaces-Ressource-Loader not working in my webapp


> Hi everybody,
>
> whenever I try to add special MyFaces-Extensions like tree2 or
JS-popup-window
> etc. to my web-app I need to implement the java-script code which belongs
to
> this extension into my html-header myself.
>
> I.e. if I want to use your pop-up-menu-tags (<x:popup />) in a specific
> JSF-Page I need to add the line
>
> <script type="text/javascript"
src="../files/javascript/JSPopup.js"></script>
>
> which contains your java-script code for the pop-up component.
>
> But after analyzing your example-webapp I recognize that you don't do
this.
> Your web-app seems to add the needed resources when they are needed, but
this
> is not working in my web-app. Also the images for tree2 (the lines which
are
> connecting the folders and the documents which each other etc.) are
missing.
>
> How can I get this feature to work?
>
> P.S: will this mail-list be reneamed in the future (because
> incubator.apache.org is old)?
>
> Greetings,
> Hendrik