Hello,
i have a problem with the standard portlet widget class shiped with yii. I have a site with different widgets and one ajaxSubmitButton which calls a ControllerAction which saves the values of a text area which is embedded into the site. After the saving of the data from this field i what to refresh the status informations inside the portlet widget (the progress of a progressbar should change and a link appear).
How can i solve this? The Portlet class looks like:
class Portlet extends CWidget
{
public $title;
public $cssClass='portlet';
public $headerCssClass='header';
public $contentCssClass='content';
public $visible=true;
public function init()
{
if(!$this->visible)
return;
echo "<div class=\"{$this->cssClass}\">\n";
if($this->title!==null)
echo "<div class=\"{$this->headerCssClass}\">{$this->title}</div>\n";
echo "<div class=\"{$this->contentCssClass}\">\n";
}
public function run()
{
if(!$this->visible)
return;
$this->renderContent();
echo "</div><!-- {$this->contentCssClass} -->\n";
echo "</div><!-- {$this->cssClass} -->";
}
protected function renderContent()
{
}
}
which is embedded into the site via
$this->widget('Classname',array('visible'=>isset(Yii::app()->session['test']->test)));
The site saves its input field(s) with this Button which calls the controller action "result"
CHtml::ajaxSubmitButton(Yii::t('Test', 'Speichern'), CHtml::normalizeUrl(array('aspeichern')), array('update' => '#result'), array('name'=>'buttonspeichern'));
My knowledge about AJAX is very limited, i hope you can help me.
Regards
Martin