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

                 Key: RF-7674
                 URL: https://jira.jboss.org/jira/browse/RF-7674
             Project: RichFaces
          Issue Type: Bug
          Components: browser compatibility
    Affects Versions: 3.3.0
         Environment: Internet Explorer 7
            Reporter: Joey asdasd
            Assignee: Nick Belaevski


Hi everybody,

I'm creating a page with rich:tree component.
The page is working perfectly with mozilla 3. In IE 7 the tree is show and I 
can expand and colapse, but when I try to select any node I get an error 
message of the script debbuger. The first node clicke is processed by the 
nodeSelectionListener but then the tree don't works anymore.
The error is indicated in line 10, the error is 'elements' is null or is not an 
object.
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

        
_______________________________________________
richfaces-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/richfaces-issues

Reply via email to