Re: [T5.1] Custom component now causes NullPointerException

2009-05-08 Thread Thiago H. de Paula Figueiredo
Em Fri, 08 May 2009 13:15:21 -0300, Eric Ma escreveu: Yes, that did the trick. Thanks for the suggestion. Looks like the lifecycle of a component has changed between T5.1 and T5.0. The lifecycle itself hasn't changed, but its internal implementation was optimized by Howard since 5.1 --

Re: [T5.1] Custom component now causes NullPointerException

2009-05-08 Thread Eric Ma
ge) resources.getPage(); > } > return this.page; > } > > Thiago > Yes, that did the trick. Thanks for the suggestion. Looks like the lifecycle of a component has changed between T5.1 and T5.0. -- View this message in context: http://www.nabble.com/-T5.1--Custom-component-now-causes-N

Re: [T5.1] Custom component now causes NullPointerException

2009-05-08 Thread Thiago H. de Paula Figueiredo
Try using lazy loading on getPage(), avoing calling resources.getPage() in your field initializer. Something like: public BasePage getPage() { if (page == null) { page = (BasePage) resources.getPage(); } return this.page; } -- Thiago -

Re: [T5.1] Custom component now causes NullPointerException

2009-05-08 Thread Eric Ma
com/file/p23448232/component_code.txt component_code.txt -- View this message in context: http://www.nabble.com/-T5.1--Custom-component-now-causes-NullPointerException-tp23447956p23448232.html Sent from the Tapestry - User mailing list arc

Re: [T5.1] Custom component now causes NullPointerException

2009-05-08 Thread Thiago H. de Paula Figueiredo
It looks like your base component class invokes Component.getPage() inside its constructor. Am I right? Could you post its code here? -- Thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional comma

Re: [T5.1] Custom component now causes NullPointerException

2009-05-08 Thread Howard Lewis Ship
urcesImpl.getPage(InternalComponentResourcesImpl.java:273) >        at > com.db.grade.web.tapestry.components.BaseComponent.initializer(BaseComponent.java:22) >        at > com.db.grade.web.tapestry.components.BaseComponent.(BaseComponent.java) >        at > com.db.grade.web.tapestry.co

[T5.1] Custom component now causes NullPointerException

2009-05-08 Thread Eric Ma
ementImpl.java:627) at org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.assembleEmbeddedComponent(ComponentAssemblerImpl.java:141) ... 117 more Any clues? -- View this message in context: http://www.nabble.com/-T5.1--Custom-component-now-causes-NullPointerException-tp23