Ok I do not see too many errors here, except one thing.
You initialize dojo in the body, in the past this has been problematic
due to the fact that some dojo components hook themselves into onload.
The better strategy is to move the
atim escape="false">
> <script type="text/javascript">
> var djConfig = {isDebug: true };
> </script>
> <script type="text/javascript"
> src="/site/dojo/dojo.js"></script>
>
into the head of your page to avoid sideffects.
Also enclose the script parts into the usual comment tags
this is closer to standard conformity and causes the browsers
to choke less.
Alternatively to your own dojo code, you can use our sandbox stuff
there is a control called dojoInitializer which basically does the
preinitialisation, also several examples are in the sandbox-examples
under the dojo dir, using the initializer and a mix of html
and jsf, or jsf only if possible already.
Dojo will be part of the core Tomahawk component library as well as the
initializer tag (and yet an undecided) number of existing sandbox
components in the upcoming myfaces 1.1.5 we are currently in the
beginning stages of the sandbox -> tomahawk migration.
The current version level of dojo in the sandbox is 0.3.1
Werner
Igor devor schrieb:
> 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
> À : [email protected]
> 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?
>
>