typechecker forbids action nested in page; how are we supposed to make proper user interfaces!?

define newLectureLink(course : Course) {
placeholder addLecture {
form{ actionLink(“[Add Lecture]”, showForm())[ajax] }
action showForm() { replace(addLecture, newLecture(course)); }
}
}

  • course/lecture-ui.app:41/28: error: This element is not allowed to be nested in other template elements:
    action showForm ( )
    {
    replace
    (
    addLecture
    ,
    newLecture(course)
    )
    ;
    }
Submitted by Eelco Visser on 11 March 2010 at 15:46

On 11 March 2010 at 15:50 Sander Vermolen commented:

Afaik nesting actions in pages is allowed. Just only at the top level:

define newLectureLink(course : Course) {
   placeholder addLecture { 
      form{ actionLink("[Add Lecture]", showForm())[ajax] } 
   }
   action showForm() { replace(addLecture, newLecture(course)); } 
}

Log in to post comments