myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Igor devor" <de...@exotismes.com>
Subject RE: myfaces + dojo = Error running scripts from content:[object Error].
Date Fri, 15 Sep 2006 12:57:20 GMT

I use dojo-0.3.1-ajax.zip
I do not use any tag. It's initialize like this :
	<f:verbatim escape="false">
		<script type="text/javascript">
			var djConfig = {isDebug: true };
		</script>
		<script type="text/javascript"
src="/site/dojo/dojo.js"></script>
		
		<script language="JavaScript" type="text/javascript">
			dojo.require("dojo.widget.*");
			dojo.require("dojo.widget.LayoutContainer");
			dojo.require("dojo.widget.FloatingPane");
			dojo.require("dojo.widget.ResizeHandle");
			
			
		function load(aid,id) {
		      var myPanel1 = dojo.widget.byId("paneOption");
	
myPanel1.setUrl("/site/option.jsf?aid="+aid+"&brid="+id);
		      myPanel1.show();
		}

		</script>
		<div dojoType="FloatingPane"
			id="paneOption"
			title="choisissez une option"
	
iconSrc="/site/dojo/demos/widget/images/flatScreen.gif"
			constrainToContainer="true"
			hasShadow="true"
			resizable="true" 
			windowState="normal";
			displayCloseAction="false";
			displayMinimizeAction="true"
			displayMaximizeAction="false"
			executeScripts="true"
			toggle="explode"
			style="width: 600px; position: absolute; height:
200px; left: 100px; top: 150px; display: none"
		>
				O_o
		</div>
	</f:verbatim>


And /site/option.jsf


<f:verbatim>


<script type="text/javascript">

    var x = new dojo.io.FormBind({
      
      formNode: dojo.byId("floatform"),
  	
      load: function(load, data, e) {
        var myPanel1 = dojo.widget.byId("paneChoix");
        myPanel1.setContent(data);
      }
  });

</script>


</f:verbatim>

</head>
<body>


	<h:form id="floatform" >
	(...)


In the attach file : the little html static exemple (dojo files not
include).
Start with min.html
Comment or delete the <!-- in form.html and that works..

Thanks,
Igor



-----Message d'origine-----
De :  Werner Punz
Envoyé : vendredi 15 septembre 2006 12:30
À : users@myfaces.apache.org
Objet : Re: myfaces + dojo = Error running scripts from content:[object
Error].

Igor devor schrieb:
>  Hi,
> 
> 	I use IE6. and i have a dojo floatpanel (option
> executeScripts="true") that load a page with javascript and evaluate it.
> 	With firefox no problem.
> 	With IE6 i have this error when the floatpanel eval the page.
> 	And with some static html i have reproduce the error, when a float 
> pane evaluate a javascript with this
> 
> <script type="text/javascript">
> <!--
> //-->
> </script>
> 
Ok... the script itself is initialized in a standardized manner, I assume
something else is at fault.

Do you use the dojo tag facilities? If yes, move them over to programmatic
javascript initialization.

We had several issues with dojo tag faclities in the past and hence have
moved our own dojo component code to pure programmatic javascript
initialisation.

I dont have a floating pane initialisation code handy, but this one comes
close:

http://example.irian.at/example-sandbox-20060915/fisheye.jsf

check out the sources

the float pane should be something alike

var newWidget =
dojo.widget.createWidget("FloatingPane",{id="componentid"},
dojo.byId("originaldiv"));


Which dojo version do you use?



Mime
View raw message