我在 joomla 2.5 中有一个组件。
我有几个视图,其中一个我有一个组合框,当我点击它时,我想调用一个函数,我有这个
<form class="product_filter" action="<?php echo JURI::root()?>index.php/com_productos/buscarCategoria" method="POST">
<input type="hidden" class="type" name="type" value="HEALTH_FOOD"/>
<div class="select_wrapper small first">
<?php echo JHTML::_('select.genericlist', $nameCombo,'name','onChange="this.form.submit()"','value','text'); ?>
</div>
我的组件的名称是 com_productos 所以在 producto.php 我有这个
class ProductosController extends JController
{
function buscarCategoria(){
$jinput = JFactory::getApplication()->input;
$view = $jinput->getCmd('view', 'productos');
JFactory::getApplication()->input->set('view', $view);
$model = &$this->getModel($view);
$view = &$this->getView($view, 'html');
$view->setModel($model, true);
$view->categoria();
}
但从不执行此功能。
任何的想法