On Fri, 11 Feb 2011 09:53:21 +0100
Wilhelmsen Tor Iver <[email protected]> wrote:

> So the best is to create a proper class that is nested but not a
> member class:
> 
> private static class BackSomePage {
>   private PageReference pageRef;
>   public BackSomePage(PageReference pageRef) {
>       this. pageRef = pageRef;
>   }
>   @Override protected void onPreviousButtonClicked() {
>     setResponsePage(pageRef.getPage());
>   }
> }

That's what I feared this would come down to. I think this is rather
awkward to use and is definitely a step backwards from 1.4.

I can see the PageReference being necessary - but if one uses
PageReference instead of Page.this, what would the harm be in still
using the anonymous class, apart from the slightly larger memory
footprint?

Carl-Eric

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to