Hi Finn,

What about setting the Page arguments as properties in your page?

 MyPage page = getContext().createPage(MyPage.class);
 page.setSecure(true);
 setForward(page);

regards Malcolm Edgar

On Mon, Aug 31, 2009 at 6:37 AM, Finn Bock<[email protected]> wrote:
> Hi,
>
> I wonder if it isn't possible to relax the restriction that page
> instances passed to setForward() must be created by
> getContext().createPage(MyPage.class);
>
> Page dependencies must of course still be injected, but it could be
> done as a separate step:
>
>  MyPage page = new MyPage(true);
>  getContext().initPage(page);
>  setForward(page);
>
> The fictional method "initPage()" will perform the injection of page
> dependencies currently found in ClickServlet.initPage():
>  activatePageInstance
>  setHeaders
>  setPath
>  auto binding
>  processPageRequestParams
>
> This way it is possible to use arguments in the constructor to forwarded 
> pages.
>
> If such a change is interesting, I would be happy to write a patch.
>
> regards,
> Finn
>

Reply via email to