Re: Why feedback panel won't work

2009-12-28 Thread Sven Meier

Hi,

feedback messages are tied to components they are reported for (the link 
in your case).
Since this component isn't located on your response page, the message 
will not be rendered.


Use Session#info() instead.

Regards

Sven

uud ashr wrote:

Hi all,

Why does wicket panel don't work if I do this:

class MyPage extends WebPage {
public MyPage() {
add(new LinkVoid(myLink) {
public void onClick() {
   * info(You just click me);*
*setResponsePage(MyAnotherPage.class); // feedback panel
won't work*
}
});
}
}

class MyAnotherPage extends WebPage {
public MyAnotherPage() {
add(new FeedbackPanel(feedback));
}
}



Won't work using:
setResponsePage(MyAnotherPage.class);

But fine when use constructor:
setResponsePage(new MyAnotherPage());

Is this a bug or not a bug?

Regards,
uudashr

  



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Why feedback panel won't work

2009-12-28 Thread Pieter Degraeuwe
I was thinking this as well, but the message should in that case also NOT
appear when you do setResponsePage(new MyAnotherPage()), no ?

On Mon, Dec 28, 2009 at 9:39 AM, Sven Meier s...@meiers.net wrote:

 Hi,

 feedback messages are tied to components they are reported for (the link in
 your case).
 Since this component isn't located on your response page, the message will
 not be rendered.

 Use Session#info() instead.

 Regards

 Sven

 uud ashr wrote:

 Hi all,

 Why does wicket panel don't work if I do this:

 class MyPage extends WebPage {
public MyPage() {
add(new LinkVoid(myLink) {
public void onClick() {
   * info(You just click me);*
*setResponsePage(MyAnotherPage.class); // feedback panel
 won't work*
}
});
}
 }

 class MyAnotherPage extends WebPage {
public MyAnotherPage() {
add(new FeedbackPanel(feedback));
}
 }



 Won't work using:
 setResponsePage(MyAnotherPage.class);

 But fine when use constructor:
 setResponsePage(new MyAnotherPage());

 Is this a bug or not a bug?

 Regards,
 uudashr





 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




-- 
Pieter Degraeuwe
Systemworks bvba
Belgiƫlaan 61
9070 Destelbergen
GSM: +32 (0)485/68.60.85
Email: pieter.degrae...@systemworks.be
visit us at http://www.systemworks.be


Re: Why feedback panel won't work

2009-12-28 Thread Sven Meier

Should be the same.

Sven

Pieter Degraeuwe wrote:

I was thinking this as well, but the message should in that case also NOT
appear when you do setResponsePage(new MyAnotherPage()), no ?

On Mon, Dec 28, 2009 at 9:39 AM, Sven Meier s...@meiers.net wrote:

  

Hi,

feedback messages are tied to components they are reported for (the link in
your case).
Since this component isn't located on your response page, the message will
not be rendered.

Use Session#info() instead.

Regards

Sven

uud ashr wrote:



Hi all,

Why does wicket panel don't work if I do this:

class MyPage extends WebPage {
   public MyPage() {
   add(new LinkVoid(myLink) {
   public void onClick() {
  * info(You just click me);*
   *setResponsePage(MyAnotherPage.class); // feedback panel
won't work*
   }
   });
   }
}

class MyAnotherPage extends WebPage {
   public MyAnotherPage() {
   add(new FeedbackPanel(feedback));
   }
}



Won't work using:
setResponsePage(MyAnotherPage.class);

But fine when use constructor:
setResponsePage(new MyAnotherPage());

Is this a bug or not a bug?

Regards,
uudashr



  

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org






  



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Why feedback panel won't work

2009-12-28 Thread Hauke Ingmar Schmidt
Hej,

2009/12/28 uud ashr uuda...@gmail.com:

 Won't work using:
 setResponsePage(MyAnotherPage.class);

 But fine when use constructor:
 setResponsePage(new MyAnotherPage());

At work we had a similar case where an object in the session, that was
explicitely set before calling, wasn't set in the called page when the
class variant was used but was set when the constructor variant was
used.

Bye
Hauke Ingmar

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Why feedback panel won't work

2009-12-27 Thread uud ashr
Hi all,

Why does wicket panel don't work if I do this:

class MyPage extends WebPage {
public MyPage() {
add(new LinkVoid(myLink) {
public void onClick() {
   * info(You just click me);*
*setResponsePage(MyAnotherPage.class); // feedback panel
won't work*
}
});
}
}

class MyAnotherPage extends WebPage {
public MyAnotherPage() {
add(new FeedbackPanel(feedback));
}
}



Won't work using:
setResponsePage(MyAnotherPage.class);

But fine when use constructor:
setResponsePage(new MyAnotherPage());

Is this a bug or not a bug?

Regards,
uudashr