Well, I don't have Tap 3 handy, but double-check the source code for
that interface you're implementing, and make sure you're implementing
all the methods in it. If you don't implement an interface method,
you'll get an error like that one you're seeing.
Check that there isn't a more specific nested exception -- scroll
down on the error page, and check all the nested messages. At least
in Tap 4, I vaguely remember that it says which method needs to be
implemented (although I might just be imagining that).
That's all the advice I can give -- hope it helps!
Cheers,
Paul
On Aug 21, 2005, at 1:17 PM, Francisco A. Lozano wrote:
Thanks for your answer,
Maybe that interface is tapetry-4 only because I can't find it in my
Tapestry3.
Anyway, I've added this:
public void pageEndRender(PageEvent event) {
// do nothing
}
To fully implement that interface, and I still get the same error...
-----Mensaje original-----
De: Paul Cantrell [mailto:[EMAIL PROTECTED]
Enviado el: domingo, 21 de agosto de 2005 19:44
Para: Tapestry users
Asunto: Re: Problem with abstract class "Unable to instantiate..."
If you implement PageRenderListener, you also need a pageEndRender
() method.
Trying implementing just PageBeginRenderListener.
Cheers,
Paul
On Aug 21, 2005, at 7:03 AM, Francisco A. Lozano wrote:
Hello,
I'm starting with tapestry 3. I have a page which I've marked as
abstract, because I have a property inside it.
I get this error when I try to access this page:
org.apache.tapestry.ApplicationRuntimeException
Unable to instantiate an instance of class
com.fll.pruebastapestry.pages.ElementForm$Enhance_4.
I've searched for such error in mailing list and I've found that it
happens when tapestry thinks it hasn't to enhance a class... But mine
has to be enhanced, as I have a property-specification marked as
persistent...
My .page is here:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE page-specification
PUBLIC
"-//Apache Software Foundation//Tapestry Specification 3.0//EN"
"http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd">
<!-- generated by Spindle, http://spindle.sourceforge.net -->
<page-specification
class="com.fll.pruebastapestry.pages.ElementForm">
<description>add a description</description>
<property-specification name="element"
type="com.fll.pruebastapestry.model.Element" persistent="yes"/>
</page-specification>
My .java is here:
package com.fll.pruebastapestry.pages;
import org.apache.tapestry.event.PageEvent;
import org.apache.tapestry.event.PageRenderListener;
import org.apache.tapestry.html.BasePage;
import com.fll.pruebastapestry.model.Element;
import com.fll.pruebastapestry.model.dao.ElementDAO;
public abstract class ElementForm extends BasePage implements
PageRenderListener{
public abstract Element getElement();
public abstract void setElement(Element element);
public void initialize() {
setElement(null);
}
public void loadData() {
System.out.println("pageBeginRender called!!!!");
if(this.getElement()==null) {
System.out.println("pageBeginRender sets element!");
this.setElement (
ElementDAO.getInstance().get("EPAT01") );
}
}
public void pageBeginRender(PageEvent event) {
loadData();
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: tapestry-user-
[EMAIL PROTECTED]
_________________________________________________________________
"The pursuit of truth and beauty is a sphere of activity in which
we are
permitted to remain children all our lives."
-- Albert Einstein
---------------------------------------------------------------------
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]
_________________________________________________________________
"After hearing ten thousand explanations, a fool is no wiser.
But an intelligent person needs only two thousand five hundred."
-- Mahabharata
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]