On 2/22/07, Jean-Baptiste Quenot <[EMAIL PROTECTED]> wrote:
* Igor Vaynberg:

> yet  another  example  of noobs  precrecreating  page  instances
> before the link  is clicked. the api of  that constructor simply
> sucks.  and  yes  martijn,  it  is very  convinient  to  do  new
> pagelink("back", backpageinstancesyougotpassedintothispage), but
> you can live with a few more lines of code :)

It's definitely  a habit  to start votes  whereas a  discussion is
sufficient ;-)

I guess this is a second try though. Last vote was voto-ed if I
remember correctly. But we just had proof that people were using this
method, which can be ok if you use it to pass a reference that you
would already be passing anyway, but not ok (not to say a very bad
idea) when passing in a new instance. I agree with Igor this method is
distracting and encourages bad practice.


If you  remove the  constructor, how  do you create  a link  to an
instance of a page then?

new Link("foo") {
 public void onClick() {
   setResponsePage(new MyPage());
 }
}

I think it's more useful to remove PageLink(String, Class) because
there is BookmarkablePageLink already that is stateless.

I don't have a strong opinion on that at this point, but it looks like
you're right about that.

Eelco

Reply via email to