Where of course RedPage extends BasePage...

On Tue, Apr 29, 2008 at 9:15 AM, Scott Swank <[EMAIL PROTECTED]> wrote:
> The method just has to be stateless, particularly from the perspective
>  of instantiation.
>
>  public BasePage(...) {
>   add(createFooPanel("fooId"));
>   add(createBarPanel("barId"));
>  }
>
>  protected abstract Panel createFooPanel(String id);
>  protected abstract Panel createFooPanel(String id);
>
>  -----
>
>  public RedPage(...) {
>   super(...);
>  }
>
>  @Override
>  protected Panel createFooPanel(String id) {
>   // do not reference anything that is instantiation dependent
>   return new RedFooPanel(id);
>  }
>
>  @Override
>  protected Panel createBarPanel(String id) {
>   // do not reference anything that is instantiation dependent
>   return new RedBarPanel(id);
>  }
>
>
>  On Tue, Apr 29, 2008 at 6:51 AM, Martin Makundi
>
> <[EMAIL PROTECTED]> wrote:
>
>
> > Bother to give an example of what you mean?
>  >
>  >  2008/4/29 Johan Compagner <[EMAIL PROTECTED]>:
>  >
>  > > no Scott just told you that you should create such initializers 
> completely
>  >  >  "static".
>  >  >  They should be 'static' without touching state of the current 
> object/class
>  >  >  itself.
>  >  >
>  >  >
>  >
>  >
>  >
>  > ---------------------------------------------------------------------
>  >  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