[richfaces-issues] [JBoss JIRA] (RF-12579) a4:status - out of memory with Jsf ui:debug tag under IE and time to time FireFox

Jean ANDRE (JIRA) jira-events at lists.jboss.org
Mon Oct 29 15:33:01 EDT 2012


Jean ANDRE created RF-12579:
-------------------------------

             Summary: a4:status - out of memory with Jsf ui:debug tag under IE and time to time FireFox
                 Key: RF-12579
                 URL: https://issues.jboss.org/browse/RF-12579
             Project: RichFaces
          Issue Type: Bug
      Security Level: Public (Everyone can see)
    Affects Versions: 4.2.3.Final
         Environment: aspectjrt-1.6.12 - bcprov-jdk14-127 - cglib-nodep-2.2.2 - cssparser-0.9.6 - guava-11.0.2 - hibernate-validator-4.2.0 - javax.faces-2.1.13 - junit-4.10 - log4j-1.2.16 - org.springframework.* -3.0.6.RELEASE - sac-1.3.jar - slf4j-api-1.6.4 - slf4j-log4j12-1.6.4 - WAS8 - RAD
            Reporter: Jean ANDRE


We have a form which triggers an ajax request - We also use the tag a4j:status to report status to the end-user on ajax request.
We also use the tag ui:debug to help us in debugging.

As so long the a4j:status is not called, everything is going well. However, when an ajax request is asked, we display a waiting message. When we return back to the form, any key triggers a popup panel displaying the message "out-of memory".

Removing the jsf tag ui:debug, solve the problem.

Then, it seems that the a4j:status is conflicting with the jsf tag ui:debug.

Under IE, the error is reported as following at the function faceletsDebug, line 317.
{code}
function faceletsDebug(URL) { day = new Date(); id = day.getTime(); eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=800,height=600,left = 240,top = 212');"); };var faceletsOrigKeyup = document.onkeyup; document.onkeyup = function(e) { if (window.event) e = window.event; if (String.fromCharCode(e.keyCode) == 'D' & e.shiftKey & e.ctrlKey) faceletsDebug('/NestedWeb/pages/index.jsf?facelets.ui.DebugOutput=1351537421561'); else if (faceletsOrigKeyup) faceletsOrigKeyup(e); };
//]]>
</script>
{code}

The page we use as template is as following
{code}
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:f="http://java.sun.com/jsf/core"
  xmlns:ui="http://java.sun.com/jsf/facelets"
  xmlns:rich="http://richfaces.org/rich"
  xmlns:a4j="http://richfaces.org/a4j">

<f:view locale="#{currentUser.locale}">
	<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" />
		<meta http-equiv="Content-Language" content="en, fr" />
		<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/nested.css" />
		<script type="text/javascript">//<![CDATA[
			function isWindows() {
				var ua = navigator.userAgent;
				var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
				return (re.exec(ua) != null);
			}
			function stopPropagation(event) {
				if (isWindows()) {
					window.event.cancelBubble = true;
				} else {
					event.stopPropagation();
				}
			}
		//]]></script>
	</h:head>
	<h:body>
		<!--                             -->
		<!--  RF 11694 workaround        -->
		<!--  JSF JAVASERVERFACES-2016   -->
		<!--                             -->
		<h:outputStylesheet id="datatableEcss" library="org.richfaces" name="datatable.ecss" />
		<h:outputScript id="datatableJs" library="org.richfaces" name="datatable.js" />
		<h:outputStylesheet library="org.richfaces" name="accordion.ecss" />
		<h:outputScript library="org.richfaces" name="accordion.js" />
		<h:outputScript library="org.richfaces" name="accordionItem.js" />
		<div id="body" class="body-container">
			<!--                         -->
			<!--       H E A D E R       -->
			<!--                         -->
			<div id="header" class="header-container">
				<ui:insert name="header" />
			</div>
			<!--                         -->
			<!--        B O D Y          -->
			<!--                         -->
			<div id="content" class="content">
				<!--               -->
				<!--    STATUS     -->
				<!--               -->
				<a4j:status id="ajax-status"
							name="ajaxStatus"
							onstart="#{rich:component('messageWaiter')}.show()"
							onstop="#{rich:component('messageWaiter')}.hide()"
							onerror="#{rich:component('errorReporter')}.show()" />
				<!--                    -->
				<!--    WAITER MESSAGE  -->
				<!--                    -->
				<rich:popupPanel id="messageWaiter"
								 modal="false"
								 autosized="true"
								 resizeable="false"
								 shadowDepth="3"
								 shadowOpacity="2"
								 top="250">
					Please wait...
				</rich:popupPanel>
				<!--                    -->
				<!--    ERROR REPORTER  -->
				<!--                    -->
				<rich:popupPanel id="errorReporter"
								 modal="true"
								 autosized="true"
								 resizeable="false"
								 shadowDepth="3"
								 shadowOpacity="2"
								 top="250">
					<f:facet name="header">
						<h:outputText value="#{msg['error.application.title']}" />
					</f:facet>
					<a4j:outputPanel layout="block">
						<p>
							<h:outputText value="#{msg['error.application.message']}" />
						</p>
						<a4j:outputPanel styleClass="right-align" layout="block">
							<!--             -->
							<!--  CLOSE CMD  -->
							<!--             -->
							<h:outputLink id="errorCloseCmd" value="#{request.contextPath}/">
								<h:outputText value="#{msg['common.command.close']}" />
							</h:outputLink>
						</a4j:outputPanel>
					</a4j:outputPanel>
				</rich:popupPanel>
				<!--                        -->
				<!--   APPLICATION CONTENT  -->
				<!--                        -->
				<ui:insert name="content" />
			</div>
			<!--                        -->
			<!--      F O O T E R       -->
			<!--                        -->
			<ui:insert name="footer" />
			<p>Debug is activated...SHIFT+CTRL+d</p>
			<ui:debug />
		</div>
	</h:body>
</f:view>
</html>
{code}


The caller is "petty standard":
{code}
			<!--            -->
			<!--  NEW LIST  -->
			<!--            -->
			<a4j:commandButton id="newListCmd"
						  value="#{msg['common.command.new.list']}"
						 action="#{panelOneController.doNewList}"
						 render="desktopTabs,menuOpenedTabs"
						 status="ajaxStatus" />
{code}

Note also that the ui:debug has an issue:
ui:debug markup update causes JS infinite recursive loop
 - http://java.net/jira/browse/JAVASERVERFACES-1855
 - http://java.net/jira/browse/JAVASERVERFACES-2426






--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the richfaces-issues mailing list