Great, that worked !!! As a general rule of thumb, does this mean that i
should initialize variables in these methods rather than during declaration
?

On Thu, Oct 23, 2014 at 6:54 PM, Chris Poulsen <mailingl...@nesluop.dk>
wrote:

> I think that
>
> private String gender = "F";
>
> is suspect, you should probably not initialize it to "F", instead you can
> use onActivate or setupRender to default it, if it is null.
>
> --
> Chris
>
> On Thu, Oct 23, 2014 at 2:45 PM, Deepak <mn.dee...@gmail.com> wrote:
>
> > I'm just beginning with Tapestry and referring to "Tapestry 5, Building
> Web
> > Applications" by Alexander Kolesnikov. But I'm using version 5.3.7.
> >
> > I have a page with a property annotated with @Persist and a default value
> > of an enum.
> >
> > <t:radiogroup t:value="gender">
> > <input type="radio" t:type="radio"
> > t:value="literal:M" /> Male
> > <input type="radio" t:type="radio"
> > t:value="literal:F"/> Female
> > </t:radiogroup>
> >
> > @Property
> > @Persist
> > private String gender = "F";
> >
> > When the page is brought up, it throws the following exception:
> >
> > http://localhost:8080/t5inaction/register
> >
> > An unexpected application exception has occurred.
> >
> > Exception assembling root component of page Register: Unable to
> instantiate
> > instance of transformed class tapestry5.inaction.pages.Register:
> > java.lang.reflect.InvocationTargetException
> >
> > why is this happening and what's wrong in my implementation ?
> >
> > Thanks,
> > Deepak
> >
>



-- 
Deepak
--------------------------------------------
Lend your voices only to sounds of freedom.
No longer lend your strength to that which you wish to be free from.
Fill your lives with love and bravery and you shall lead... a life
uncommon.

Reply via email to