Re: Create WebPage inside a TimerTask Class

2008-06-09 Thread Igor Vaynberg
you should use wickettester to do this...that will create all the
proper threadlocal mocks you need.

-igor


On Mon, Jun 9, 2008 at 12:48 AM, Fabien D. <[EMAIL PROTECTED]> wrote:
>
> Hi, thank you for tour help...
>
> This is a very strange behavior. I have tried to display this page, so I
> have created a link to this page, and everything is good, I have my Page,
> and it enters into the constructor.
>
> I have tried to put this timer class into a WebPage put, unfortunately it
> does'nt enter into the constructor!!
>
> And finally, I have made a simpleThread like this :
>
> public class GestionThread extends java.lang.Thread{
>private boolean stopThread = false;
>
>public void run() {
>
>boolean fin = false;
>GestionEmail g = new GestionEmail();
>g.emailTimer(new Date());
>
>}
>
> It does'nt enter into the constructor to!!
> It stops at this line :
>
> .
> log.info(Testing1"); -> display
> EmailPage emailcontent = new EmailPage(user,list_sous_domaine,
> abo.getDateAncienne() , abo.getDateFuture());
>
> .
>
> .
>public EmailPage(TUtilisateur user, List list_sousdomaine, Date ancien,
> Date futur){
>log.info(Testing2"); -> never display
>this.user = user;
>this.list_sousdomaine = list_sousdomaine;
>this.ancien = ancien;
>this.futur = futur;
>this.initPage();
>    }
> .
>
> If someone have an idea to solve this problem! Thank you in advance.
> --
> View this message in context: 
> http://www.nabble.com/Create-WebPage-inside-a-TimerTask-Class-tp17693737p17728018.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> 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]



Re: Create WebPage inside a TimerTask Class

2008-06-09 Thread Fabien D.

Hi, thank you for tour help...

This is a very strange behavior. I have tried to display this page, so I
have created a link to this page, and everything is good, I have my Page,
and it enters into the constructor.

I have tried to put this timer class into a WebPage put, unfortunately it
does'nt enter into the constructor!!

And finally, I have made a simpleThread like this :

public class GestionThread extends java.lang.Thread{
private boolean stopThread = false;

public void run() {

boolean fin = false;
GestionEmail g = new GestionEmail();
g.emailTimer(new Date());

} 

It does'nt enter into the constructor to!!
It stops at this line :

.
log.info(Testing1"); -> display
EmailPage emailcontent = new EmailPage(user,list_sous_domaine,
abo.getDateAncienne() , abo.getDateFuture());

.

.
public EmailPage(TUtilisateur user, List list_sousdomaine, Date ancien,
Date futur){
log.info(Testing2"); -> never display
this.user = user;
this.list_sousdomaine = list_sousdomaine;
this.ancien = ancien;
this.futur = futur;
this.initPage();
}
.

If someone have an idea to solve this problem! Thank you in advance.
-- 
View this message in context: 
http://www.nabble.com/Create-WebPage-inside-a-TimerTask-Class-tp17693737p17728018.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Create WebPage inside a TimerTask Class

2008-06-08 Thread Eelco Hillenius
You'll need to set the whole thread up like you would regularly do
when you want to construct and render a Wicket page in a separate
thread. After that, it should just work. If it doesn't even execute
your log statement, I suspect something else is wrong. Do you have a
stack trace to share?

Eelco

On Fri, Jun 6, 2008 at 7:39 AM, Fabien D. <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I have a timer class associated with  a timertask class, to send daily an
> email generated by wicket
>
> But in my timertask when I try to create my WebPage thanks to the
> constructor, it never enters to the constructor...
>
> I would like to do something like that :
>
> in my timertask
> ...
> EmailPage emailcontent = new EmailPage(user,list_sous_domaine,
> abo.getDateAncienne() , abo.getDateFuture());
> emailcontent.render();
> String message_corps = emailcontent.getSource();
> 
>
>
>
> public class EmailPage extends WebPage{
>
>public EmailPage(TUtilisateur user, List list_sousdomaine, Date ancien,
> Date futur){
>log.info("Testing !! "); -> never displayed
> .
>}
> 
> }
>
>
> How can I solve this problem?
>
> Thank you in advance for your help
> --
> View this message in context: 
> http://www.nabble.com/Create-WebPage-inside-a-TimerTask-Class-tp17693737p17693737.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> 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]