I think you are missing "t:value" in your template.
It should be :
<input t:type="TextField" t:id="username" t:value="username"
t:validate="required" size="30"/>
Jeffrey Ai
Jean-Philippe Steinmetz-2 wrote:
>
> Hi All,
>
> I'm getting the following error
>
> Error persisting field Users/Create:username:
> java.lang.NullPointerException
>
> In my page class I have...
>
> @Persist
> private String username;
>
> public String getUsername()
> {
> return username;
> }
> public void setUsername(String username)
> {
> this.username = username;
> }
>
> and in my template I have
>
> <t:label for="username"/>:
> <input t:type="TextField" t:id="username" t:validate="required"
> size="30"/>
>
> So i'm not sure why i'd be getting this error. Does anyone have ideas? I
> tried setting some default value to username in the setupRender() function
> but that doesn't seem to solve the problem.
>
> Thanks in advance,
>
> Jean-Philippe Steinmetz
>
>
--
View this message in context:
http://www.nabble.com/-T5--Cannot-persist-field-exception-tf4824029.html#a13887482
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]