tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Lewis-Shell" <rlewissh...@mac.com>
Subject AbstractFormComponent problem
Date Tue, 16 Dec 2003 21:42:58 GMT
I am tracking a problem with our app as I convert it to Tapestry 3.  We have
a problem when a page rewind decides to enable a property that causes a
ValidField + FieldLabel to be added into the page.  In Tapestry 3, such a
newly added FieldLabel preceeding its ValidField causes a NPE in
ValidationDelegate.isInError(IFormComponent):435 because the ValidField
component has not had a its setForm() method invoked yet - and that doesn't
happen until the ValidField renders, which is generally AFTER the

In Tapestry 2.2, AbstractFormComponent.getForm() was implemented like this:
        return Form.get(getPage().getRequestCycle());

(and there was no setForm(IForm))

However, now it is an enhanced property, it relies on its renderComponent()
to set it as a side-effect of getForm(IRequestCycle).  I am wondering what
the rationale was behind this switch?  The old method seemed fairly
bullet-proof as it wasn't reliant on such render ordering...



To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org

View raw message