Malcolm Edgar <[email protected]>:
> Hi Finn,
>
> What about setting the Page arguments as properties in your page?
>
>  MyPage page = getContext().createPage(MyPage.class);
>  page.setSecure(true);
>  setForward(page);

Yes, but I would like the arguments to be available in the
constructor. So the solution available right now is:

  MyPage page = getContext().createPage(MyPage.class);
  getContext().setRequestAttribute("secure", true);
  setForward(page);

and in the page ctor:

  public MyPage() {
     Boolean secure = (Boolean) getContext().getRequestAttribute("secure");
     ...
  }

and it just feels wrong that it is easier to pass request parameters
into @Bindable fields (which btw is very nice) than it is to pass
ordinary java objects into a class constructor.

regards,
Finn

Reply via email to