I have a working TreeMultiSelect, the sourceObject I've used is a subtype of page (Gallery).
However the field shows the whole SiteTree, rather than just these subtypes. Thankfully it ignores if you try to pick a normal page but it still bugs me.
Probably unrelated but Photograph is managed in ModelAdmin
class Photograph extends DataObject {
...
static $many_many = array(
'Galleries' => 'Gallery'
);
...
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab("Root.Galleries", new TreeMultiselectField('Galleries', 'Choose Galleries to show Photo', "Gallery"));
return $fields;
}
...
}
class Gallery extends Page {
...
static $belongs_many_many = array(
'Photographs' => 'Photograph'
);
}
class Gallery_Controller extends Page_Controller {
...
}