Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
5.0
-
None
Description
You have to write a bit of minor scaffolding:
private MyObject _object;
void onPrepare() {
if (_object == null)
_object = new MyObject();
}
Seems like the BeanEditForm could do this on its own: check for null, create a new instance, update the parameter at the end of the render or form submission.
Obviously, this is predicated on the type being a JavaBean with a no-args constructor, and not an interface or abstract class, or anything else more complicated.
Attachments
Issue Links
- incorporates
-
TAPESTRY-1361 BeanEditForm will throw NullPointerException if its object parameter is bound to null
- Resolved