Parse error on new form

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Parse error on new form

bigal.nz
Hi All,

I have a form which is used to both display data from the database and submit new records to the database.

The form has two groups of fields for recording the details of persons.

When I try to load a blank copy of the form I get parse error:

Could not parse as expression: "*{persons[0].surname" (episode:595)

Line 595 is:

<input type="text" class="form-control" id="surname0" placeholder="surname" name="surname" th:field="*{persons[0].surname"/>

Of course on loading a empty for which has a backing object of new Episode then persons[0] doesnt yet exist.

Is there a way to handle this?

Regards,

Al
Reply | Threaded
Open this post in threaded view
|

Re: Parse error on new form

bigal.nz
FYI I found the answer.

I had .toUpperCase on my getters and setters and it didnt like that!