[richfaces-issues] [JBoss JIRA] Created: (RF-7135) problem with rich:tree in ie 7 with richfaces 3.3.0 and 3.3.1

Josafá Jr (JIRA) jira-events at lists.jboss.org
Wed May 13 13:43:47 EDT 2009


problem with rich:tree in ie 7 with richfaces 3.3.0 and 3.3.1
-------------------------------------------------------------

                 Key: RF-7135
                 URL: https://jira.jboss.org/jira/browse/RF-7135
             Project: RichFaces
          Issue Type: Bug
          Components: browser compatibility
    Affects Versions: 3.3.0
         Environment: Internet Explorer 7
            Reporter: Josafá Jr
             Fix For: 3.3.1


Hi everybody,

I'm creating a page with rich:tree component.
The page is working perfectly with mozilla 3 but when I try to view the page in IE 7 I get a error message of the script debbuger that says:
Error in line 10, the error is 'elements' is null or is not an object.
whe I go to debug the debbuger shows a javascript and highlight the text: "var field=form.elements[fields[i]]" in line 10.

My code is: 
 			<rich:tree id="treeModelo" style="width:200px" value="#{modeloTreeBean.treeNode}" nodeFace="#{item.tipo}" 
					var="item" switchType="ajax" nodeSelectListener="#{modeloTreeBean.processSelection}" 
					ajaxSubmitSelection="true" ajaxKeys="#{null}" reRender="treeModelo">
        		<rich:treeNode type="ap" iconLeaf="/images/icons/document.png" icon="/images/icons/document.png" >
					<h:outputText value="#{item.nome}" />
        		</rich:treeNode>
        		<rich:treeNode type="m" iconLeaf="/images/icons/document.png" icon="/images/icons/document.png" >
					<h:outputText value="#{item.nome}" />
        		</rich:treeNode>
        		<rich:treeNode type="p" iconLeaf="/images/icons/document.png" icon="/images/icons/document.png" >
					<h:outputText value="#{item.nome}" />
        		</rich:treeNode>
    		</rich:tree>

the complete code of the debbuger is:

if(!window.A4J){window.A4J={};}
if(!A4J.findForm){function _JSFFormSubmit(linkId,formName,target,parameters){var form=(typeof formName=='string'?document.getElementById(formName):formName);if(form){var paramNames=[];var oldTarget=form.target;if(target){form.target=target;}
if(parameters){for(var param in parameters){paramNames.push(param);if(form.elements[param]){form.elements[param].value=parameters[param];}else{var input=document.createElement("input");input.type="hidden";input.id=param;input.name=param;input.value=parameters[param];if(param==="javax.faces.portletbridge.STATE_ID"&&form.firstChild){form.insertBefore(input,form.firstChild);}else{form.appendChild(input);}}}}
var onsubmitResult;if(form.fireEvent){onsubmitResult=form.fireEvent("onsubmit");}else{var event=document.createEvent("HTMLEvents");event.initEvent("submit",true,true)
onsubmitResult=form.dispatchEvent(event);}
if(onsubmitResult){form.submit();}
_clearJSFFormParameters(formName,oldTarget,paramNames);}else{alert("Form "+formName+" not found in document");}
return false;};function _clearJSFFormParameters(formName,target,fields){var form=(typeof formName=='string'?document.getElementById(formName):formName);if(form){if(target){form.target=target;}else{form.target='';}
if(fields){for(var i=0;i<fields.length;i++){var field=form.elements[fields[i]];if(field){var pNode=field.parentNode;if(pNode){pNode.removeChild(field);}}}}}}
function clearFormHiddenParams(formName,target,fields){_clearJSFFormParameters(formName,target,fields);}
A4J.findForm=function(element){var parent=element;do{parent=parent.parentNode;}while(parent&&parent.nodeName.toLowerCase()!='form');if(!parent){parent={reset:function(){},submit:function(){}};}
return parent;}
A4J._formInput=null;A4J.setupForm=function(id){var element=(typeof id=='string'?window.document.getElementById(id):id);var name="click";if(element.addEventListener){element.addEventListener(name,A4J._observer,false);}else if(element.attachEvent){element.attachEvent('on'+name,A4J._observer);}}
A4J._observer=function(evt){var src=evt.target||evt.srcElement;if(src&&src.nodeName.toUpperCase()=='INPUT'&&src.type.toUpperCase()=='SUBMIT'){A4J._formInput=src;}else{A4J._formInput=null;}}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       




More information about the richfaces-issues mailing list