In my Dataobject i am trying to pass variables with Requirements::javascriptTemplate ...
class Item extends DataObject {
.........
public function getCMSFields() {
$fields = parent::getCMSFields();
Requirements::javascriptTemplate('mysite/javascript/Item.js', array('Title' => $this->Title));
..........
As i expected, editing my Item- DataObject within a GridField should always pass $this->Title.
But doesnt.
In Item.js i call alert('$Title')
but
$this->Title always has a Value of the very first-called Item.
How can i force updating the variable?
thanks.timo.