Too many objects generated when creating new object
Program below result in 2 objects in DB of type View when going through createView, an empty one, and the actual object.
module viewsection view
define page view(v: View) {
base()
}define page editView(v: View) {
base("Edit view "+v.name)
define body() {
editView_(v)
}
}define page createView(p: Project) {
base(“Create new view”)
define body() {
var v := View { project := p};
editView_(v)
}
}define editView_(v: View) {
Submitted by Rob Vermaas on 10 June 2010 at 14:54
action save() {
v.save();
return project(v.project);
}
header{“Edit view:”}
form {
table {
derive editRows from v for (name, description, keep)
action(“Save”, save())
}
}
}
Log in to post comments