Thank you very much for the reference:
I am still having a bit of trouble binding data and updating subreport
when subReport.update method is called a variable "leping" should be set as parameter. However it does not. I have debugged by displaying this variable via window.alert and it is correctly collected from the combo box but when the subReport is updated it still behaves as if this parameter would be NULL.
my code
<div class="form-group">
<label>Vali klient:</label>
<?php
Select::create(array(
"name"=>"lepingsel",
"id"=>"lepingsel",
"dataStore"=>$this->dataStore("kliendid"),
"defaultOption"=>array("--"=>null),
"dataBind"=>array(
"text"=>"kliendinimi",
"value"=>"lepinguid"
),
"clientEvents"=>array(
"change"=>"function(){
subReport.update('clientselecting',{
leping:$('#lepingsel').val(),
});
subReport.update('clientparcelslist');
window.alert($('#lepingsel').val());
}",
),
"attributes"=>array(
"class"=>"form-control",
)
));
?>
</div>
<?php
if($this->params["leping"])
{ // from here it behaves as the parameter is set to NULL