Mehmet Salgar created GTNPORTAL-3588:
----------------------------------------
Summary: Possiblity to place JS in Portal Header
Key: GTNPORTAL-3588
URL:
https://issues.jboss.org/browse/GTNPORTAL-3588
Project: GateIn Portal
Issue Type: Feature Request
Components: WebUI
Affects Versions: 3.6.0.Final
Reporter: Mehmet Salgar
Priority: Optional
I am trying to use Atmosphere Framework with Gatein, Atmosphere relies self calling
javascript function to initialize itself.
The application I try to build is a JSF application (with Portlet Bridge) and for that
reason JSF tries to include several javascript into the portlet.
Unfortunately, one of them is jQuery (the others are jquery-plugins.js and atmosphere.js)
which contains a self calling function as constructor but while all the scripts are
defined outside of the <head> element, jQuery is not able to identify jquery-plugins
and atmosphere self calling functions and initialize them while they are out side of the
<head> elements.
I read your documentation and they are claiming I have to use gatein-resources,xml to be
able to via requireJS but actually this is also not working and these methods are never
called.
I need a direct configuration possibility to place these elements under the <head>
element so javascript engine can call them.
I found the following statement in one of your documents
"The JSR286 specification provides a mechanism for modifying portal headers that can
be used to load JavaScript files. Although this mechanism is portable, it has severe
drawbacks:
A script can be loaded multiple times, specially if two portlets in two different war
files load the same scripts since the only way to identify a script is by its URL
Scripts have to be loaded by the head section of the portal impacting front end
performances"
via "org.gatein.javascript.dependency" but I can't make this to work also.
So a direct possibility to add javascript to the head elements of portal will be really
appreciated.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)