-----------------------------------------------------------------------------------------
Here The Functionality is We need to get the List of Documents depends upon the Category Choosen From the Selectbox.
//actions.class.php
public function executeOpen(){
$cat_criteria = new Criteria();
$categories = CategoriesPeer::doSelect($cat_criteria);
foreach($categories as $category) {
$options[$category->getId()] = $category->getName();
}
$this->categories = $options;
}
//openSuccess.php
select_tag("category", options_for_select($categories), array("onChange" => remote_function(array(
'update' => 'docs',
'url' => 'manuals/documents',
'with' => "'id=' + \$F('category')",
))
)); ?>
< div id="docs" > < /div >
//actions.class.php
public function executeDocuments() {
$cat_id = $this->getRequestParameter('id');
$c = new Criteria();
$c->add(DocumentsPeer::CATEGORY_ID,$cat_id);
$documents = DocumentsPeer::doSelect($c);
$result = "";
foreach($documents as $document) {
$result .= "<a href='/orm/web/manuals/view/id/".$document->getId()."'>>".$document->getTitle()."<</a>><<>>";
";
//$result .= "";
}
echo $result;
return SfView::NONE;
}