You can't. Tapestry evaluates the abstract classes as it loads the pages and components, and your class is not a page or component. The only way to do what you want is to make your page extend the interface.

----- Original Message ----- From: "Sylvain COUTANT" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, September 16, 2005 5:31 AM
Subject: PgeValidateListener & InjectState


Hi all,

I'm wondering how to make this work :

public abstract class MyPageValidateListener implements PageValidateListener {

@InjectState("user-data")
public abstract UserSession getUserSession();

public void pageValidate(PageEvent event) {
...
return;
}

}

public abstract class MyBasePage extends BasePage {

public BasePage() {
super();
addPageValidateListener(new MyPageValidateListener());
}

}


There is obviously something I didn't understood : if MyPageValidateListener is abstract, it can't be instantiated and I can't use @InjectState without making it abstract ...

Could someone explain me how I could do this without injecting through xml files ?

Thanks in advance for any tip ;-)


--
Sylvain COUTANT

ADVISEO
http://www.adviseo.fr/
http://www.open-sp.fr/



---------------------------------------------------------------------
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