Case counts; PageAttached() is wrong, should be pageAttached().
There's an outstanding bug that Tapestry's unimplemented abstract
method check is broken.
On 9/30/05, Alan Chandler <[EMAIL PROTECTED]> wrote:
> I am puzzled. Just coded up a new bit of my application and put on debug in
> the PageAttached method of the new page class.
>
> But before it hits this, I get a 500 status error which lists (top few lines)
> the root cause as being,..
>
> java.lang.AbstractMethodError:
> $Create_0.pageAttached(Lorg/apache/tapestry/event/PageEvent;)V
> at
> org.apache.tapestry.AbstractPage.firePageAttached(AbstractPage.java:426)
> at org.apache.tapestry.AbstractPage.attach(AbstractPage.java:251)
> at
> org.apache.tapestry.engine.RequestCycle.loadPage(RequestCycle.java:286)
> at
> org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:248)
> at
> org.apache.tapestry.engine.RequestCycle.activate(RequestCycle.java:609)
> at org.apache.tapestry.engine.PageService.service(PageService.java:67)
>
> How do I find out what is wrong?
>
> MY class looks so ..
>
> package uk.org.chandlerfamily.tapestry.famtree;
>
> import org.apache.tapestry.html.BasePage;
>
> import org.apache.tapestry.event.*;
> import org.apache.tapestry.annotations.*;
> import org.apache.tapestry.IPage;
>
> import com.ibatis.sqlmap.client.*;
>
>
> import java.sql.SQLException;
>
> import uk.org.chandlerfamily.sqlmap.famtree.PersonSummary;
> import uk.org.chandlerfamily.sqlmap.famtree.Date;
> import uk.org.chandlerfamily.tapestry.famtree.Edit;
>
>
> public abstract class Create extends BasePage implements PageAttachListener {
>
> public abstract void setButtonClicked(int buttonClicked);
> public abstract int getButtonClicked();
>
> public abstract int getPersonId();
> public abstract void setPersonId(int personId);
>
> public abstract PersonSummary getThisPerson();
> public abstract void setThisPerson(PersonSummary thisPerson);
>
> public void PageAttached (PageEvent event) {
> PersonSummary aPerson = new PersonSummary();
> // This should be the default fields for a new person
> aPerson.setForename("");
> aPerson.setSurname("");
> aPerson.setDOB(new Date(0,0,0)); //Sets date to mean
> completely unknown
> aPerson.setMale(true);
> setThisPerson(aPerson);
> }
> @InjectPage("Edit")
> public abstract Edit getEditPage();
>
> public IPage handleForm () {
> if (getButtonClicked() == 1) {
> SqlMapClient map=DataMap.getSqlMapInstance();
> try{
> map.insert("createPerson",getThisPerson());
> } catch (SQLException e) {
> throw new RuntimeException ("SQLException in
> Detail: "+ e );
> }
> Edit edit = getEditPage();
> edit.setPersonId(getThisPerson().getId());
> return edit;
> } else
> return null;
>
> }
>
> }
>
>
>
> --
> Alan Chandler
> http://www.chandlerfamily.org.uk
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind
Professional Tapestry training, mentoring, support
and project work. http://howardlewisship.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]