I have the following code that generates an ajax link exactly as I want it:
'controllerRoute' => 'xrefCompteamperson/addpersondlg',
'actionParams' => array('id'=>$model->compid, 'pool'=>$model->poolno),
'dialogTitle' => 'Add Player(s)',
'dialogWidth' => 550,
'dialogHeight' => 400,
'openButtonText' => 'Add Player(s)',
'closeButtonText' => 'Close',
'closeOnAction' => true, //important to invoke the close action in the actionCreate
'refreshGridId' => 'xref-compteam-grid', //the grid with this id will be refreshed after closing
In my xrefCompteamperson/addpersondlg function I have:
When I click the link the dialog displays and shows the full page including header, menu etc. Doco says that if its an iframe the "EQuickDlgs::render" statement should show without the header, menu etc.
The content should be rendered into a ‘iframe’ layout, because the application header, menu … should not be visible, but the css/js-files should be present.
If I change the render to renderPartial a blank page is shown and the underlying html source is completely empty.
I actually thought I had this working earlier but now its not and I dont recall what might have changed.
I worked out what had changed. the PROBLEM LINE above is what causes the issue. If I get rid of the second parameter, everything displays correctly. For instance, this must have been what I started with.
'actionParams' => array('id'=>$model->compid), <<<< THIS WORKS
unfortunately, I need the 2nd parameter.
Is there a workaround? or do I need to change the source?
I found the answer, it was in the comments section for quickdlgs. The problem is when you specify an additional parameter it inserts the ? after the first. When quickdlgs appends its parameters it also uses a ?. It should be checking to see if a ? exists and if so, use the & instead of the ?.
You need to make changes to the EAjaxJuiDlg.php on line 82 (or thereabouts) and EFrameJuiDlg.php on line 80 (or thereabouts).