| Author |
Message |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 22/01/2007 12:09:02
|
Erol
Joined: 22/12/2006 00:00:00
Messages: 11
Offline
|
Given an ICEfaces page which contains a JavaScript tag in the HTML head:
...
<head>
<script language="javascript" src="./js/myscript.js"></script>
</head>
...
Assume that the first page that is loaded contains a command link that refers to the page described above using navigation rules. So when clicking on the command link, the page should be loaded. This is indeed the case, but when looking at the HTML source in the browser, the javascript tag is not shown (which means the script has not been loaded). When reloading the page manually, then the script shows up in the header.
This problem also occurrs when:
a) The script is placed within the body (instead the head)
b) The script is surrounded by <f:verbatim>...</f:verbatim> tags (in either the body or the head)
c) The script is additionally surrounded by CDATA tags like suggested in http://www.icefaces.org/JForum/posts/list/651.page
It seems that ICEfaces does NOT include java scripts on pages that are accessed using a navigation rule.
The only fix that we know is that the javascript inclusion has to be placed on each page (even if the page does not require the java script, which is very uggly).
As a side note: we use a panel border layout on each page... however, ICEfaces MUST allow for inclusion of custom JavaScripts on ANY page.
Can someone confirm this bug? Any suggestions or ideas?
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 22/01/2007 13:31:26
|
philip.breau

Joined: 08/05/2006 00:00:00
Messages: 2620
Offline
|
Hi,
Yes, this can happen if you aren't using <redirect/>s in your navigation rule. If you don't use a <redirect/> the header won't be loaded for the page you're navigating to. There's two workarounds for this:
1. Use a <redirect/> in your navigation rule.
2. Include the library through JavascriptContext.includeLib(String);
Thanks,
Philip
|
. |
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 23/01/2007 03:07:19
|
Erol
Joined: 22/12/2006 00:00:00
Messages: 11
Offline
|
Hi Philip,
Your solution with <redirect/> works fine - that is the one we will use in the future.
Thanks a lot!
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 14/05/2007 04:12:22
|
robmat

Joined: 06/03/2007 00:00:00
Messages: 8
Offline
|
Ok, but redirect doesn't work when you have includes in the page...
|
God damned programmers... |
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 15/10/2007 12:10:58
|
Christian75
Joined: 31/08/2007 00:00:00
Messages: 8
Offline
|
Hello,
I have similar problem with icefaces 1.6.1 and facelets.
I included a custom component for fck editor.
The only way getting this component working (except the navigation <redirect/> option), was to include the js link for fckeditor.js in every html header.
The JavascriptContext.includeLib method does not work.
Same problem with the stylesheet includes.
Will this problem be fixed?
|
regards, Christian |
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 24/06/2009 07:33:44
|
tsing
Joined: 19/06/2009 00:00:00
Messages: 1
Offline
|
@@@@@@@@@@@@
|
|
|
 |
|
|