Virtual fields in crud.form

Bug #559122 reported by Paweusz on 2010-04-09
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
play framework
New
Undecided
Unassigned

Bug Description

In 1.0.2 release in crud.form following code appeared in line 32: <div class="crudField crud_${field.type}">. If I try to add virtual field to a form (I mean field that is not in model object) I get NullPointerException : Cannot get property 'type' on null object. It's because there's no field variable. Shouldn't this line look like this: <div class="crudField${field? 'crud_'+field.type : ''}">?

Guillaume Bort (guillaume-bort) wrote :

You can define a virtual field, but you have to define the proper custom handler.

Changed in play:
status: New → Invalid
Paweusz (paweusz-gmail) wrote :

Code in line 32 of crud.form is independent from custom handler, that code is in play tag. I think it's regresion from 1.0.1 where there was no forced css class definition for given field and in remaining code there was always check if 'field' is not null.

Changed in play:
status: Invalid → New
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers