Not during, after the page has finished loading.

The useful aspect is this: most cool Ajax-y things people will have
made rely on having that AjaxRequestTarget handy (most often in the
onClick of a AjaxFallbackLink . There is a small, but real, number of
circumstances where you want to do one of those things as soon as the
page is done loading, rather than waiting for a user click. (And it
would be cleaner to not have to manually call the javascript onClick,
but keep it in the Java)

My example, again, is a ModalWindow. Ideally I would have liked an
upload button on our "view mode" page take the user to the edit mode
page, and then have the edit mode fire off its upload ModalWindow.
(the Edit Page already had its own Upload button). Instead, after
trying a few things out, I was compelled to give the View Mode page
its own Upload dialog, though I exposed what the Edit page was doing
to make the window, so there wasn't TOO too much duplication. Then, on
the ModalWindows onclose, it called the Edit Page's routine for what
to do when the ModalWindow closed, and then jumped to the Edit Page.
This made I had to create an instance of the Edit Page earlier than I
wanted to...

But if I had something like
onPageDoneLoading(AjaxRequestTarget pArt) function, I could have used
that in Edit Page to check a boolean, and then open up its own Modal
Window.

Thanks for at least thinking about my issue :-)
-Kirk

On Nov 17, 2007 1:47 PM, Matej Knopp <[EMAIL PROTECTED]> wrote:
> No, there is no such thing as having ajax request target during page
> load. What would it do, anyway?
>
> What we could do is making ModalWindow.getWindowOpenJavascript public,
> so that you could use the resuling javascript in
> IHeaderResponse.renderOnDomReadyJavascript().
>
> -Matej
>
>
> On Nov 16, 2007 7:50 PM, Kirk Israel <[EMAIL PROTECTED]> wrote:
> > So my back up plans didn't work out as well as I had hoped.
> >
> > Is there any answer to this?
> >
> > Obviously, it would be lovely if there was some equivalent of the
> > javascript body onLoad command (and maybe tied in with that) that
> > could give the user an AjaxRequestTarget to play with... Is there
> > anything like that around?
> >
> >
> >
> > On Nov 16, 2007 11:49 AM, Kirk Israel <[EMAIL PROTECTED]> wrote:
> > > (Sorry, I should have added I found the September discussion, I
> > > wondered if there was a more elegant solution in the meanwhile...)
> > >
> > >
> > > On Nov 16, 2007 11:45 AM, Kirk Israel <[EMAIL PROTECTED]> wrote:
> > > > Is there a way to get a ModalWindow to open up along with its
> > > > underlying page? The usual show() takes an AjaxRequestTarget ...  I
> > > > have at least one work around in mind (ripping out the ModalWindow
> > > > into a separate object so the launching page could show it too) but it
> > > > would be more elegant to just modify the constructor so that it takes
> > > > a boolean causing the page to start with the dialog...
> > > >
> > > > Thanks!
> > > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to