I don't think you'll need jQuery for this. SilverStripe should handle this just fine:
A) place the following code in your ActionPage_Controller class
protected $detailData;
public function details(){
// get the id parameter
$id = intval(Director::urlParam('ID'));
// get the DataObject with the given ID and store it in $detailData
$this->detailData = DataObject::get_by_id('Action', $id);
// return empty array, so that the correct templates are being used
return array();
}
// accessor for the detail data
public function DetailData(){
return $this->detailData;
}
B) after that, you should be able to call the "details" method, by appending details/id to your page-url, where id is your DataObject ID. Example: http://yoursite.com/your-action-page/details/5
The method will fetch the DataObject with the given ID and assign it to the detailData member-variable. This can then be accessed in the Template using $DetailData.
C) The beauty of this is, that you can use a custom Template (or Layout) file for the details page. Just name it: ActionPage_details.ss. In this template you can then call something like:
<% control DetailData %>
... access all memebers of the Action DataObject here ...
<% end_control %>
There are actually several possible solutions to this problem, this is just one of them (that works for me). I think it's also possible to directly return data to the template renderer by returning some special formatted array (instead of an emtpy one). But the proposed method works equally well.