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: [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]