Do you use Eclipse? There is a compiler warning that you can turn on (it should be on by default) that warns against this problem whenever you may inadvertently be "hiding" other variables. I suggest to everyone I teach that they turn it on (and perhaps even turn it up from warning to error), and of course, stop ignoring the little yellow squiggly lines :)
On Sun, Oct 10, 2010 at 12:47 PM, Zeldor <pgronkiew...@gmail.com> wrote: > > It does! Thanks a lot! I knew it was something stupid and trivial. Huh, but > it should not cause that still - I was defining TextFields in same way and > then again to add parameters and it went fine. > > On Sun, Oct 10, 2010 at 7:11 PM, Andrea Del Bene [via Apache Wicket] < > ml-node+2970427-965616561-152...@n4.nabble.com<ml-node%2b2970427-965616561-152...@n4.nabble.com> > <ml-node%2b2970427-965616561-152...@n4.nabble.com<ml-node%252b2970427-965616561-152...@n4.nabble.com> > > > > wrote: > > > Hello Zeldor, > > > > I've red your code and it seems that you define variable rc two times: > > the first time as form private field and the second time just below > > between braces. When onSubmit method calls rc.getModelObject() it uses > > private field rc which was not initialized and so triggers a > > NullPointerException. Try to remove the second type definition > > "RadioChoice<String>" and it should work. > > > -- Jeremy Thomerson http://www.wickettraining.com