You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Kito D. Mann (JIRA)" <my...@incubator.apache.org> on 2005/04/07 01:39:16 UTC
[jira] Created: (MYFACES-172) Default images in JSCookMenu can't be found.
Default images in JSCookMenu can't be found.
--------------------------------------------
Key: MYFACES-172
URL: http://issues.apache.org/jira/browse/MYFACES-172
Project: MyFaces
Type: Bug
Versions: 1.0.9 beta
Environment: Tomcat 5.0x, Windows XP, 1.09RC2
Reporter: Kito D. Mann
Due to the changes in MyFaces 1.09 that allow JavaScript resources to be loaded from the MyFaces JAR, the relative path names for JSCookMenu issues aren't resolving correctly. A workaround is to copy the themes to your web application and override the JavaScript files automatically referenced by the component's renderer:
<f:view>
<x:stylesheet path="/themes/ThemeOffice/theme.css"/>
<script src="/webmodule/themes/ThemeOffice/theme.js" type="text/javascript"/>
<x:jscookMenu layout="hbr" theme="ThemeOffice">
<x:jscookMenu layout="hbr" theme="ThemeIE">
<x:navigationMenuItems value="#{testBean.sample2}"/>
<x:navigationMenuItem itemLabel="Tab 4" action="Tab4"/>
</x:jscookMenu>
</f:view>
Here are the details about the problem:
Reply-To: "MyFaces Discussion" <my...@incubator.apache.org>
Delivered-To: mailing list myfaces-user@incubator.apache.org
Subject: RE: Jscookmenu - ThemeOffice - Images not displaying?
Date: Thu, 31 Mar 2005 14:07:56 -0500
Thread-Topic: Jscookmenu - ThemeOffice - Images not displaying?
From: "Neal Haggard" <Ne...@sas.com>
To: "MyFaces Discussion" <my...@incubator.apache.org>
Yes, I'm using 1.0.9, the latest from CVS. It looks like 1.0.9 started using the AddResource interface to have the javascripts & styles automatically added. If you look at the links they generate, they go to:
/faces/myFacesExtensionResource/navmenu.NavigationMenuItem/1112283493000/jscookmenu/JSCookMenu.js
Or a similar link, which I assume gets handled by the faces extension resource filter. However, the images (based on looking in /src/components/org/apache/myfaces/custom/navmenu/resources/jscookmenu/ThemeOffice/theme.js) are being looked for in a context-relative location:
var cmThemeOfficeBase = 'jscookmenu/ThemeOffice/';
...
itemRight: '<img alt="" src="' + cmThemeOfficeBase + 'blank.gif">',
...
I don't see how these can be resolved without having jscookmenu/ThemeOffice/*.gif in a relative location.
Note that I'm even getting this with the 1.0.9 RC2 examples war file. Image not found place-holders in the nav menu.
-----Original Message-----
From: Aaron Bartell [mailto:aaronbartell@gmail.com]
Sent: Thursday, March 31, 2005 1:46 PM
To: MyFaces Discussion
Subject: Re: Jscookmenu - ThemeOffice - Images not displaying?
What version of MyFaces are you using? I had the same problem when I went to MyFaces 1.0.9. When I went back to 1.0.7 and everything was back to normal.
Take a look at the <head>...</head> section of the page produced by MyFaces that has a jsCookMenu on it - do you see a bunch of extra style sheets and javascript links that you didn't specify in your JSP? (that is what I saw in my pages after upgrading to 1.0.9)
HTH
Aaron Bartell
Neal Haggard wrote:
>I realized when I saw the subject come up that I really have two questions. The question I asked in my last note being a bit more pressing. The other question is I'm seeing the styles & the javascript is rendering for the jscookMenu, however the internal images that the javascript loads on the right hand side of the sub-child elements are not rendering. I get the image not found placeholder (the infamous red 'X'). Is there something else I need to add to my Extensions Filter configuration to let that work?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
[jira] Commented: (MYFACES-172) Default images in JSCookMenu can't be found.
Posted by "Kito D. Mann (JIRA)" <my...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/MYFACES-172?page=comments#action_62314 ]
Kito D. Mann commented on MYFACES-172:
--------------------------------------
FYI, this problem shows in IE, but not Firefox.
> Default images in JSCookMenu can't be found.
> --------------------------------------------
>
> Key: MYFACES-172
> URL: http://issues.apache.org/jira/browse/MYFACES-172
> Project: MyFaces
> Type: Bug
> Versions: 1.0.9 beta
> Environment: Tomcat 5.0x, Windows XP, 1.09RC2
> Reporter: Kito D. Mann
>
> Due to the changes in MyFaces 1.09 that allow JavaScript resources to be loaded from the MyFaces JAR, the relative path names for JSCookMenu issues aren't resolving correctly. A workaround is to copy the themes to your web application and override the JavaScript files automatically referenced by the component's renderer:
> <f:view>
> <x:stylesheet path="/themes/ThemeOffice/theme.css"/>
> <script src="/webmodule/themes/ThemeOffice/theme.js" type="text/javascript"/>
>
> <x:jscookMenu layout="hbr" theme="ThemeOffice">
> <x:jscookMenu layout="hbr" theme="ThemeIE">
> <x:navigationMenuItems value="#{testBean.sample2}"/>
> <x:navigationMenuItem itemLabel="Tab 4" action="Tab4"/>
> </x:jscookMenu>
> </f:view>
> Here are the details about the problem:
> Reply-To: "MyFaces Discussion" <my...@incubator.apache.org>
> Delivered-To: mailing list myfaces-user@incubator.apache.org
> Subject: RE: Jscookmenu - ThemeOffice - Images not displaying?
> Date: Thu, 31 Mar 2005 14:07:56 -0500
> Thread-Topic: Jscookmenu - ThemeOffice - Images not displaying?
> From: "Neal Haggard" <Ne...@sas.com>
> To: "MyFaces Discussion" <my...@incubator.apache.org>
> Yes, I'm using 1.0.9, the latest from CVS. It looks like 1.0.9 started using the AddResource interface to have the javascripts & styles automatically added. If you look at the links they generate, they go to:
> /faces/myFacesExtensionResource/navmenu.NavigationMenuItem/1112283493000/jscookmenu/JSCookMenu.js
> Or a similar link, which I assume gets handled by the faces extension resource filter. However, the images (based on looking in /src/components/org/apache/myfaces/custom/navmenu/resources/jscookmenu/ThemeOffice/theme.js) are being looked for in a context-relative location:
> var cmThemeOfficeBase = 'jscookmenu/ThemeOffice/';
> ...
> itemRight: '<img alt="" src="' + cmThemeOfficeBase + 'blank.gif">',
> ...
> I don't see how these can be resolved without having jscookmenu/ThemeOffice/*.gif in a relative location.
> Note that I'm even getting this with the 1.0.9 RC2 examples war file. Image not found place-holders in the nav menu.
> -----Original Message-----
> From: Aaron Bartell [mailto:aaronbartell@gmail.com]
> Sent: Thursday, March 31, 2005 1:46 PM
> To: MyFaces Discussion
> Subject: Re: Jscookmenu - ThemeOffice - Images not displaying?
> What version of MyFaces are you using? I had the same problem when I went to MyFaces 1.0.9. When I went back to 1.0.7 and everything was back to normal.
> Take a look at the <head>...</head> section of the page produced by MyFaces that has a jsCookMenu on it - do you see a bunch of extra style sheets and javascript links that you didn't specify in your JSP? (that is what I saw in my pages after upgrading to 1.0.9)
> HTH
> Aaron Bartell
> Neal Haggard wrote:
> >I realized when I saw the subject come up that I really have two questions. The question I asked in my last note being a bit more pressing. The other question is I'm seeing the styles & the javascript is rendering for the jscookMenu, however the internal images that the javascript loads on the right hand side of the sub-child elements are not rendering. I get the image not found placeholder (the infamous red 'X'). Is there something else I need to add to my Extensions Filter configuration to let that work?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira