You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Kirk Israel <ki...@kisrael.com> on 2007/10/23 20:41:37 UTC

retrieving page from ModalWindow's setPageCreator(ModalWindow.PageCreator)

I looked at the JavaDoc and inspected the class, but couldn't find a
clear way of getting the page I'm generating in
ModalWindow.setPageCreator's createPage() out of the ModalWindow.

(My situation is a little complex: I want a single "upload image"
ModalWindow (and corresponding page embedded in that, I think it has
to be a page so that I can use the Upload tag properly) for the entire
parent page. And then components of the parent page .show() the
ModalWindow after passing themselves into its embedded page, so that
the embedded page can call them back with the data the user uploaded.)

It's not a blocking issue, because createPage() is being defined
inside the parentPage, and I can set a reference to the new page, but
it means the parentPage has to expose two seperate elements: the
ModalWindow itself, so it can be show()'d, and the embedded Page, so
the Page's callback function can be set.

So, is there an obvious way of doing this that I missed? I see there's
a getPage() function but that seems to be the basic Component
implementation of it.

Thanks!

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: retrieving page from ModalWindow's setPageCreator(ModalWindow.PageCreator)

Posted by Matej Knopp <ma...@gmail.com>.
Modal window doesn't keep the reference to the page. What prevents you
from keeping the reference inside the page creator instance if you
need to?

-Matej

On 10/23/07, Kirk Israel <ki...@kisrael.com> wrote:
> I looked at the JavaDoc and inspected the class, but couldn't find a
> clear way of getting the page I'm generating in
> ModalWindow.setPageCreator's createPage() out of the ModalWindow.
>
> (My situation is a little complex: I want a single "upload image"
> ModalWindow (and corresponding page embedded in that, I think it has
> to be a page so that I can use the Upload tag properly) for the entire
> parent page. And then components of the parent page .show() the
> ModalWindow after passing themselves into its embedded page, so that
> the embedded page can call them back with the data the user uploaded.)
>
> It's not a blocking issue, because createPage() is being defined
> inside the parentPage, and I can set a reference to the new page, but
> it means the parentPage has to expose two seperate elements: the
> ModalWindow itself, so it can be show()'d, and the embedded Page, so
> the Page's callback function can be set.
>
> So, is there an obvious way of doing this that I missed? I see there's
> a getPage() function but that seems to be the basic Component
> implementation of it.
>
> Thanks!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org