Passing known transient value as ref argument to page or ajaxtemplate should give an error
Submitted by Danny Groenewegen on 20 December 2013 at 13:56ajaxtemplate editableString(x : Ref<String>) { placeholder showString showString(x) } ajaxtemplate showString(x : Ref<String>) { action edit(){ replace(showString, editString(x)); } output(x) " " submitlink edit() { "[edit]" } } ajaxtemplate editString(x : Ref<String>) { action save() { replace(showString, showString(x)); } action cancel() { replace(showString, showString(x)); } form{ input(x) submit save() { "Save" } } submit cancel() { "Cancel" } } entity Project{ name : String } var p := Project{} page root(){ var s := "" editableString(s) // error editableString(p.name) // ok }
Log in to post comments