You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jun Tsai <ju...@gmail.com> on 2006/10/26 10:32:57 UTC

How to custom the script event.

I find tapestry produce the script

dojo.event.connect(window, 'onload', function(e) {
  dojo.require("tapestry.form");tapestry.form.registerForm("AForm");
 ....
});


I want to do something after onload.but I find
dojo.event.connect("after",window,'onload',this,"testFun"));

I find my testFun function called before tapestry onload function.

If I change tapestry onload as
dojo.event.connect("before",window, 'onload', function(e) {

   dojo.require("tapestry.form");tapestry.form.registerForm("AForm");
    ....
});

works fine.

How to custome this?




-- 
Welcome to China Java Users Group(CNJUG).
http://cnjug.dev.java.net

Re: How to custom the script event.

Posted by Jesse Kuhnert <jk...@gmail.com>.
dojo.event.connect("after", dojo, "onload",function(){}) ?

On 10/31/06, Jun Tsai <ju...@gmail.com> wrote:
>
> I want to do something after "dojo.onload".
> not in dojo.onload.
>
>
> 2006/11/1, Jesse Kuhnert <jk...@gmail.com>:
> >
> > Either ;
> >
> > dojo.addOnLoad(function(){
> > // your script
> > });
> >
> > Or use the <initialization> block of a @Script template.
> >
> > On 10/31/06, Jun Tsai <ju...@gmail.com> wrote:
> > >
> > > How  to execute some script after "dojo.onload"?
> > > Thanks.
> > >
> > > 2006/10/27, Jesse Kuhnert <jk...@gmail.com>:
> > > >
> > > > You can override portions of
> > > > org.apache.tapestry.services.impl.DefaultResponseBuilder to bind
> > window
> > > > loading things they way you want.
> > > >
> > > > Really the window loading stuff happens with dojo.addOnLoad() in the
> > > > current
> > > > repo though.
> > > >
> > > > On 10/26/06, Jun Tsai <ju...@gmail.com> wrote:
> > > > >
> > > > > I find tapestry produce the script
> > > > >
> > > > > dojo.event.connect(window, 'onload', function(e) {
> > > > >   dojo.require("tapestry.form
> ");tapestry.form.registerForm("AForm");
> > > > > ....
> > > > > });
> > > > >
> > > > >
> > > > > I want to do something after onload.but I find
> > > > > dojo.event.connect("after",window,'onload',this,"testFun"));
> > > > >
> > > > > I find my testFun function called before tapestry onload function.
> > > > >
> > > > > If I change tapestry onload as
> > > > > dojo.event.connect("before",window, 'onload', function(e) {
> > > > >
> > > > >    dojo.require("tapestry.form
> > ");tapestry.form.registerForm("AForm");
> > > > >     ....
> > > > > });
> > > > >
> > > > > works fine.
> > > > >
> > > > > How to custome this?
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Welcome to China Java Users Group(CNJUG).
> > > > > http://cnjug.dev.java.net
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > Jesse Kuhnert
> > > > Tapestry/Dojo/(and a dash of TestNG), team member/developer
> > > >
> > > > Open source based consulting work centered around
> > > > dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
> > > >
> > > >
> > >
> > >
> > > --
> > > Welcome to China Java Users Group(CNJUG).
> > > http://cnjug.dev.java.net
> > >
> > >
> >
> >
> > --
> > Jesse Kuhnert
> > Tapestry/Dojo/(and a dash of TestNG), team member/developer
> >
> > Open source based consulting work centered around
> > dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
> >
> >
>
>
> --
> Welcome to China Java Users Group(CNJUG).
> http://cnjug.dev.java.net
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo/(and a dash of TestNG), team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

Re: How to custom the script event.

Posted by Jun Tsai <ju...@gmail.com>.
I want to do something after "dojo.onload".
not in dojo.onload.


2006/11/1, Jesse Kuhnert <jk...@gmail.com>:
>
> Either ;
>
> dojo.addOnLoad(function(){
> // your script
> });
>
> Or use the <initialization> block of a @Script template.
>
> On 10/31/06, Jun Tsai <ju...@gmail.com> wrote:
> >
> > How  to execute some script after "dojo.onload"?
> > Thanks.
> >
> > 2006/10/27, Jesse Kuhnert <jk...@gmail.com>:
> > >
> > > You can override portions of
> > > org.apache.tapestry.services.impl.DefaultResponseBuilder to bind
> window
> > > loading things they way you want.
> > >
> > > Really the window loading stuff happens with dojo.addOnLoad() in the
> > > current
> > > repo though.
> > >
> > > On 10/26/06, Jun Tsai <ju...@gmail.com> wrote:
> > > >
> > > > I find tapestry produce the script
> > > >
> > > > dojo.event.connect(window, 'onload', function(e) {
> > > >   dojo.require("tapestry.form");tapestry.form.registerForm("AForm");
> > > > ....
> > > > });
> > > >
> > > >
> > > > I want to do something after onload.but I find
> > > > dojo.event.connect("after",window,'onload',this,"testFun"));
> > > >
> > > > I find my testFun function called before tapestry onload function.
> > > >
> > > > If I change tapestry onload as
> > > > dojo.event.connect("before",window, 'onload', function(e) {
> > > >
> > > >    dojo.require("tapestry.form
> ");tapestry.form.registerForm("AForm");
> > > >     ....
> > > > });
> > > >
> > > > works fine.
> > > >
> > > > How to custome this?
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Welcome to China Java Users Group(CNJUG).
> > > > http://cnjug.dev.java.net
> > > >
> > > >
> > >
> > >
> > > --
> > > Jesse Kuhnert
> > > Tapestry/Dojo/(and a dash of TestNG), team member/developer
> > >
> > > Open source based consulting work centered around
> > > dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
> > >
> > >
> >
> >
> > --
> > Welcome to China Java Users Group(CNJUG).
> > http://cnjug.dev.java.net
> >
> >
>
>
> --
> Jesse Kuhnert
> Tapestry/Dojo/(and a dash of TestNG), team member/developer
>
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
>
>


-- 
Welcome to China Java Users Group(CNJUG).
http://cnjug.dev.java.net

Re: How to custom the script event.

Posted by Jesse Kuhnert <jk...@gmail.com>.
Either ;

dojo.addOnLoad(function(){
 // your script
});

Or use the <initialization> block of a @Script template.

On 10/31/06, Jun Tsai <ju...@gmail.com> wrote:
>
> How  to execute some script after "dojo.onload"?
> Thanks.
>
> 2006/10/27, Jesse Kuhnert <jk...@gmail.com>:
> >
> > You can override portions of
> > org.apache.tapestry.services.impl.DefaultResponseBuilder to bind window
> > loading things they way you want.
> >
> > Really the window loading stuff happens with dojo.addOnLoad() in the
> > current
> > repo though.
> >
> > On 10/26/06, Jun Tsai <ju...@gmail.com> wrote:
> > >
> > > I find tapestry produce the script
> > >
> > > dojo.event.connect(window, 'onload', function(e) {
> > >   dojo.require("tapestry.form");tapestry.form.registerForm("AForm");
> > > ....
> > > });
> > >
> > >
> > > I want to do something after onload.but I find
> > > dojo.event.connect("after",window,'onload',this,"testFun"));
> > >
> > > I find my testFun function called before tapestry onload function.
> > >
> > > If I change tapestry onload as
> > > dojo.event.connect("before",window, 'onload', function(e) {
> > >
> > >    dojo.require("tapestry.form");tapestry.form.registerForm("AForm");
> > >     ....
> > > });
> > >
> > > works fine.
> > >
> > > How to custome this?
> > >
> > >
> > >
> > >
> > > --
> > > Welcome to China Java Users Group(CNJUG).
> > > http://cnjug.dev.java.net
> > >
> > >
> >
> >
> > --
> > Jesse Kuhnert
> > Tapestry/Dojo/(and a dash of TestNG), team member/developer
> >
> > Open source based consulting work centered around
> > dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
> >
> >
>
>
> --
> Welcome to China Java Users Group(CNJUG).
> http://cnjug.dev.java.net
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo/(and a dash of TestNG), team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

Re: How to custom the script event.

Posted by Jun Tsai <ju...@gmail.com>.
How  to execute some script after "dojo.onload"?
Thanks.

2006/10/27, Jesse Kuhnert <jk...@gmail.com>:
>
> You can override portions of
> org.apache.tapestry.services.impl.DefaultResponseBuilder to bind window
> loading things they way you want.
>
> Really the window loading stuff happens with dojo.addOnLoad() in the
> current
> repo though.
>
> On 10/26/06, Jun Tsai <ju...@gmail.com> wrote:
> >
> > I find tapestry produce the script
> >
> > dojo.event.connect(window, 'onload', function(e) {
> >   dojo.require("tapestry.form");tapestry.form.registerForm("AForm");
> > ....
> > });
> >
> >
> > I want to do something after onload.but I find
> > dojo.event.connect("after",window,'onload',this,"testFun"));
> >
> > I find my testFun function called before tapestry onload function.
> >
> > If I change tapestry onload as
> > dojo.event.connect("before",window, 'onload', function(e) {
> >
> >    dojo.require("tapestry.form");tapestry.form.registerForm("AForm");
> >     ....
> > });
> >
> > works fine.
> >
> > How to custome this?
> >
> >
> >
> >
> > --
> > Welcome to China Java Users Group(CNJUG).
> > http://cnjug.dev.java.net
> >
> >
>
>
> --
> Jesse Kuhnert
> Tapestry/Dojo/(and a dash of TestNG), team member/developer
>
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
>
>


-- 
Welcome to China Java Users Group(CNJUG).
http://cnjug.dev.java.net

Re: How to custom the script event.

Posted by Jesse Kuhnert <jk...@gmail.com>.
You can override portions of
org.apache.tapestry.services.impl.DefaultResponseBuilder to bind window
loading things they way you want.

Really the window loading stuff happens with dojo.addOnLoad() in the current
repo though.

On 10/26/06, Jun Tsai <ju...@gmail.com> wrote:
>
> I find tapestry produce the script
>
> dojo.event.connect(window, 'onload', function(e) {
>   dojo.require("tapestry.form");tapestry.form.registerForm("AForm");
> ....
> });
>
>
> I want to do something after onload.but I find
> dojo.event.connect("after",window,'onload',this,"testFun"));
>
> I find my testFun function called before tapestry onload function.
>
> If I change tapestry onload as
> dojo.event.connect("before",window, 'onload', function(e) {
>
>    dojo.require("tapestry.form");tapestry.form.registerForm("AForm");
>     ....
> });
>
> works fine.
>
> How to custome this?
>
>
>
>
> --
> Welcome to China Java Users Group(CNJUG).
> http://cnjug.dev.java.net
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo/(and a dash of TestNG), team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com