In practical situations the ajax template and the normal template will be identical.
It would be convenient if these templates would be interchangeable.
Such that the template can be called when the page is build, and the same template is used for the ajax replace call.

A current workaround is:

define ajax pageFragmentAjax(){
pageFragment()
}

define pageFragment(){
// the ajax html
}

page ajaxEnabled(){
// some html
placeholder ajaxField {
pageFragment()
}

// someaction:
replace(ajaxField, pageFragment())
// more html
}

Submitted by Tim on 18 March 2010 at 11:05

On 18 March 2010 at 12:03 Danny Groenewegen commented:

This is currently possible, for example:

define page root() {
  bla
}
define ajax bla(){"123456789"}

btw, you don’t get an error when you have such overlapping template definitions?


On 18 March 2010 at 12:51 Tim commented:

Oh, we do..
(I fixed this in the issue description)

Log in to post comments