[ https://issues.jboss.org/browse/RF-8608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12642776#comment-12642776 ]
Tomas Cerny edited comment on RF-8608 at 11/14/11 7:44 PM: ----------------------------------------------------------- Here is a workaround: go to file ui.pack.js and replace variable "params" for "myparams" in the part related to processEffect.js ---- if(!Richfaces.effect){Richfaces.effect={} }Richfaces.effect.create=function(options){if(!options){options={} }var myparams=options.params||{}; options.params=null; var attachObj; var targetObj; var targetId=options.targetId; var attachId=options.attachId; if(options.attachObj){try{attachObj=eval(options.attachObj) }catch(e){}if(typeof attachObj=="object"){attachId=attachObj }}if(options.targetObj){try{targetObj=eval(options.targetObj) }catch(e){}if(typeof targetObj=="object"){targetId=targetObj }}if(!targetId){targetId=attachId }if(!myparams.targetId){myparams.targetId=targetId }myparams.type=options.type; if(!options.event){with(window){eval(options.name+"=function(){return Richfaces.processEffect(Object.extend(this,arguments[0]||{}));}.bind(myparams)") }}else{var ename=Richfaces.effectEventOnOut(options.event||""); if(ename){var bindedFunction=function(event){return Richfaces.processEffect(this) }.bindAsEventListener(myparams); Event.observe(attachId,ename,bindedFunction,myparams.useCapture||false) }}} ; ----- if you do not use bulk js. then do the same in the file processEffect.js was (Author: enda): Here is a workaround: go to file ui.pack.js and replace variable "params" for "myparams" ---- if(!Richfaces.effect){Richfaces.effect={} }Richfaces.effect.create=function(options){if(!options){options={} }var myparams=options.params||{}; options.params=null; var attachObj; var targetObj; var targetId=options.targetId; var attachId=options.attachId; if(options.attachObj){try{attachObj=eval(options.attachObj) }catch(e){}if(typeof attachObj=="object"){attachId=attachObj }}if(options.targetObj){try{targetObj=eval(options.targetObj) }catch(e){}if(typeof targetObj=="object"){targetId=targetObj }}if(!targetId){targetId=attachId }if(!myparams.targetId){myparams.targetId=targetId }myparams.type=options.type; if(!options.event){with(window){eval(options.name+"=function(){return Richfaces.processEffect(Object.extend(this,arguments[0]||{}));}.bind(myparams)") }}else{var ename=Richfaces.effectEventOnOut(options.event||""); if(ename){var bindedFunction=function(event){return Richfaces.processEffect(this) }.bindAsEventListener(myparams); Event.observe(attachId,ename,bindedFunction,myparams.useCapture||false) }}} ; ----- if you do not use bulk js. then do the same in the file processEffect.js > rich:effect name does not properly create the JS function to be called > ---------------------------------------------------------------------- > > Key: RF-8608 > URL: https://issues.jboss.org/browse/RF-8608 > Project: RichFaces > Issue Type: Bug > Security Level: Public(Everyone can see) > Components: component-misc, regression > Affects Versions: 3.3.3.Final > Reporter: Tomas Cerny > Fix For: 3.Future > > Attachments: richFacesRegister.xhtml > > > rich:effect name does not properly create the JS function.. > Consider your documentation example: > <!-- invoking by JavaScript --> > <div id="contentDiv">...</div> > <input type="button" onclick="hideDiv({duration:0.7})" value="Hide" /> > <input type="button" onclick="showDiv()" value="Show" /> > <rich:effect name="hideDiv" for="contentDiv" type="Fade" /> > <rich:effect name="showDiv" for="contentDiv" type="Appear" /> > it worked on the older version but in 3.3.3 so I must downgrade :| > This is my browser complaint: > Error: Effect[A.type] is not a constructor > Source File: http://localhost/a4j/g/3_3_3.Final/org/richfaces/ui.pack.js > Line: 15201 -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira _______________________________________________ richfaces-issues mailing list richfaces-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/richfaces-issues