]
Jean ANDRE edited comment on RF-11757 at 11/30/11 10:43 AM:
------------------------------------------------------------
We found a solution - Instead to place the code that call the ecss and the js inside the
header, we put the instruction at the end of the page. Like this, richfaces is loaded
before we call the specific ecss et js to be reloaded. Here the code.
{code}
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" >
<html
<f:view>
<h:head>
<meta http-equiv="Expires" content="0" />
<meta http-equiv="Pragma" content="No-cache" />
<meta http-equiv="Cache-Control" content="private" />
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8" />
<title><ui:insert name="title"><h:outputText
value="#{msg['common.label.application.title']}"/></ui:insert></title>
<link type="text/css" rel="stylesheet"
href="#{webApplicationUtil.baseURL}css/crm-enterprise.css" />
</h:head>
<h:body styleClass="crm-enterprise">
<div id="body" class="body-container">
<!-- -->
<!-- H E A D E R -->
<!-- -->
<div class="header-container">
<ui:insert name="header" />
</div>
<!-- -->
<!-- B O D Y -->
<!-- -->
<div id="content" class="content">
<ui:insert name="content" />
</div>
<!-- -->
<!-- F O O T E R -->
<!-- -->
<ui:insert name="footer" />
<ui:debug></ui:debug>
</div>
<!-- -->
<!-- RF 11694 workaround -->
<!-- JSF JAVASERVERFACES-2016 -->
<!-- -->
<h:outputStylesheet library="org.richfaces"
name="datatable.ecss" />
<h:outputScript library="org.richfaces" name="datatable.js"
/>
</h:body>
</f:view>
</html>
{code}
This bug must to be link to the RF-11694
was (Author: jorelia64):
We found a solution - Instead to place the code that call the ecss and the js inside
the header, we put the instruction at the end of the page. Like this, richfaces is loaded.
Here the code.
{code}
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" >
<html
<f:view>
<h:head>
<meta http-equiv="Expires" content="0" />
<meta http-equiv="Pragma" content="No-cache" />
<meta http-equiv="Cache-Control" content="private" />
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8" />
<title><ui:insert name="title"><h:outputText
value="#{msg['common.label.application.title']}"/></ui:insert></title>
<link type="text/css" rel="stylesheet"
href="#{webApplicationUtil.baseURL}css/crm-enterprise.css" />
</h:head>
<h:body styleClass="crm-enterprise">
<div id="body" class="body-container">
<!-- -->
<!-- H E A D E R -->
<!-- -->
<div class="header-container">
<ui:insert name="header" />
</div>
<!-- -->
<!-- B O D Y -->
<!-- -->
<div id="content" class="content">
<ui:insert name="content" />
</div>
<!-- -->
<!-- F O O T E R -->
<!-- -->
<ui:insert name="footer" />
<ui:debug></ui:debug>
</div>
<!-- -->
<!-- RF 11694 workaround -->
<!-- JSF JAVASERVERFACES-2016 -->
<!-- -->
<h:outputStylesheet library="org.richfaces"
name="datatable.ecss" />
<h:outputScript library="org.richfaces" name="datatable.js"
/>
</h:body>
</f:view>
</html>
{code}
This bug must to be link to the RF-11694
jQuery is not defined and other runtime javascript error
--------------------------------------------------------
Key: RF-11757
URL:
https://issues.jboss.org/browse/RF-11757
Project: RichFaces
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: 4.1.0.CR1
Environment: Websphere 8 - RAD 8 - JSF Mojorra 2.1.4 - Spring 3.0.6 Final - Use
@Inject @Named @SessionScoped as annotations - Firefox 7.0.1 - Windows 7 (6.1 sp1) -
AspectJ 1.6.12 / AJDT
Reporter: Jean ANDRE
Attachments: screenshot-1.jpg
We are facing to some errors of javascript:
1) Once the application displayed the home page. Under firebug we have the following
javascript error:
jQuery is not defined - [Stopper sur une erreur] })(jQuery, window.RichFaces);
datata...chfaces (ligne 113) :
http://localhost:12000/crm/javax.faces.resource/datatable.js.jsf?ln=org.r.... We
think that behavior is related to the workaround related to the bugs RF-11694 and
JAVASERVERFACES-2016. Loading only the css or the ecss seems not be enough - Missing
component ?
Here is the code involved - The last line is the line 113
{code}
(function ($, richfaces) {
richfaces.ui = richfaces.ui || {};
richfaces.ui.DataTable = function(id, options) {
$super.constructor.call(this, id);
this.options = $.extend(this.options, options || {});
this.attachToDom();
};
richfaces.BaseComponent.extend(richfaces.ui.DataTable);
var $super = richfaces.ui.DataTable.$super;
$.extend(richfaces.ui.DataTable, {
SORTING: "rich:sorting",
FILTERING: "rich:filtering",
SUBTABLE_SELECTOR:".rf-cst"
});
$.extend(richfaces.ui.DataTable.prototype, ( function () {
var invoke = function(event, attributes) {
richfaces.ajax(this.id, event, {"parameters" : attributes});
};
var createParameters = function(type, id, arg1, arg2) {
var parameters = {};
var key = this.id + type;
parameters[key] = (id + ":" + (arg1 || "") + ":" + arg2);
var eventOptions = this.options.ajaxEventOption;
for (key in eventOptions) {
if (!parameters[key]) {
parameters[key] = eventOptions[key];
}
}
return parameters;
};
return {
name : "RichFaces.ui.DataTable",
sort: function(columnId, direction, isClear) {
invoke.call(this, null, createParameters.call(this, richfaces.ui.DataTable.SORTING,
columnId, direction, isClear));
},
clearSorting: function() {
this.sort("", "", true);
},
filter: function(columnId, filterValue, isClear) {
invoke.call(this, null, createParameters.call(this, richfaces.ui.DataTable.FILTERING,
columnId, filterValue, isClear));
},
clearFiltering: function() {
this.filter("", "", true);
},
expandAllSubTables: function() {
this.invokeOnSubTables('expand');
},
collapseAllSubTables: function() {
this.invokeOnSubTables('collapse');
},
switchSubTable: function(id) {
this.getSubTable(id).switchState();
},
getSubTable: function(id) {
return richfaces.$(id);
},
invokeOnSubTables: function(funcName) {
var elements =
$(document.getElementById(this.id)).children(richfaces.ui.DataTable.SUBTABLE_SELECTOR);
var invokeOnComponent = this.invokeOnComponent;
elements.each(
function() {
if (this.firstChild && this.firstChild[richfaces.RICH_CONTAINER] &&
this.firstChild[richfaces.RICH_CONTAINER].component) {
var component = this.firstChild[richfaces.RICH_CONTAINER].component;
if (component instanceof RichFaces.ui.CollapsibleSubTable) {
invokeOnComponent(component, funcName);
}
}
}
);
},
invokeOnSubTable: function(id, funcName) {
var subtable = this.getSubTable(id);
this.invokeOnComponent(subtable, funcName);
},
invokeOnComponent: function(component, funcName) {
if (component) {
var func = component[funcName];
if (typeof func == 'function') {
func.call(component);
}
}
},
destroy: function() {
$super.destroy.call(this);
}
}
})());
})(jQuery, window.RichFaces);
{code}
2) RichFaces.ui.DataTable is not a constructor
[Stopper sur une erreur] <!-- --><a href=...JJ9ij1zRoAAA=="
autocomplete="off" /> index.jsf (ligne 242)
here is the line 242
{code}
<!-- --><a href="#"
id="tabbedForm:TAB_CLIENT-1322666340965-resultListClient:3:TAB_CLIENT-1322666340965-verifyCmd"
name="tabbedForm:TAB_CLIENT-1322666340965-resultListClient:3:TAB_CLIENT-1322666340965-verifyCmd"
onclick="RichFaces.ajax("tabbedForm:TAB_CLIENT\u002D1322666340965\u002DresultListClient:3:TAB_CLIENT\u002D1322666340965\u002DverifyCmd",event,{"incId":"1"}
);return false;">VĂ©rifier</a></td></tr></tbody><tbody
id="tabbedForm:TAB_CLIENT-1322666340965-resultListClient:sc"><tr><td
style="display: none"><script type="text/javascript">new
RichFaces.ui.DataTable("tabbedForm:TAB_CLIENT\u002D1322666340965\u002DresultListClient",{"ajaxEventOptions":{}
}
)</script></td></tr></tbody></table></span></div><script
type="text/javascript">new
RichFaces.ui.Tab("tabbedForm:TAB_CLIENT\u002D1322666340965",{"index":2,"leave":null,"switchMode":"ajax","enter":"enterTab('TAB_CLIENT\u002D1322666340965')","onenter":function(event){enterTab('TAB_CLIENT-1322666340965')},"togglePanelId":"tabbedForm:desktopTabPanel","name":"TAB_CLIENT\u002D1322666340965","disabled":false}
)</script></div><div id="tabbedForm:TAB_CLIENT-1322666274787"
style="display:none;"></div><script
type="text/javascript">new
RichFaces.ui.Tab("tabbedForm:tab\u002Dworkitems",{"index":0,"leave":null,"switchMode":"ajax","enter":"enterTab('')","onenter":function(event){enterTab('')},"togglePanelId":"tabbedForm:desktopTabPanel","name":"tab\u002Dworkitems","disabled":false}
)</script><script type="text/javascript">new
RichFaces.ui.Tab("tabbedForm:tab\u002Dsearch",{"index":1,"leave":null,"switchMode":"ajax","enter":"enterTab('')","onenter":function(event){enterTab('')},"togglePanelId":"tabbedForm:desktopTabPanel","name":"tab\u002Dsearch","disabled":false}
)</script><script type="text/javascript">new
RichFaces.ui.Tab("tabbedForm:TAB_CLIENT\u002D1322666340965",{"index":2,"leave":null,"switchMode":"ajax","enter":"enterTab('TAB_CLIENT\u002D1322666340965')","onenter":function(event){enterTab('TAB_CLIENT-1322666340965')},"togglePanelId":"tabbedForm:desktopTabPanel","name":"TAB_CLIENT\u002D1322666340965","disabled":false}
)</script><script type="text/javascript">new
RichFaces.ui.Tab("tabbedForm:TAB_CLIENT\u002D1322666274787",{"index":3,"leave":null,"switchMode":"ajax","enter":"enterTab('TAB_CLIENT\u002D1322666274787')","onenter":function(event){enterTab('TAB_CLIENT-1322666274787')},"togglePanelId":"tabbedForm:desktopTabPanel","name":"TAB_CLIENT\u002D1322666274787","disabled":false}
)</script></div><input type="hidden"
name="javax.faces.ViewState" id="javax.faces.ViewState"
value="H4sIAAAAAAAAAO1aW2xcxRme3cTQBBoF50ZaOQ2JCSSN196L105S1DiOg5faJmQ3LoRKYfac8e6Jz56ZzJmz3g0QlYe2UlHVSi1CSFRFog99SHhBquCFi1BVCZWojVohFVWCqgLxQIVQK9T2pTNz9nL23HacOpVqdR+OZrX//PPPf/n+y9krn4ABYlNwxwVYhymHGWZqFtrVeUgGbv3jm2/tfOx3G0DyFNhsYqifghrDtAA2sSpFdhWbeoN8/TgQnzdWvgBAQqw0BrIMlstIP4Vp7Whp6sT56bnCzEJpJJ3NZPL5fGYiNzE5MYJ0g43UDF030QKsIYeCbY/OSSFMaFVSD5YvII0d+9G1h3+21T5oJgFoEM59I+EfBlIqJ2imgSxWahLkXASXwYbu9m2e7WWDsqoOm36adOwR2dzYkfz4SA1Sg0GzyCBzbD+HCSUhca3mWIYGmYGtcD47PHxMaLOzRIcscKcTKqdxszkmmzNs9k1MlwsM1eyj6aMXzhs6mxzLd1l2VsnOak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c8fR+7edN3pfcVUf3ods9mmXHCytZgEHiHHkFGqMGQZatMT7iQa4YU2ZuHFEpvJVfRxWUDCVVpHhH2yrTxb920kt+oKAAA"
autocomplete="off" />
</form><span id="enterTab" style="display:
none;"><script
type="text/javascript">enterTab=function(tabId){RichFaces.ajax("enterTab",null,{"incId":"1","parameters":{"tabId":tabId}
} )};</script></span>
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: