title: Agile Toolkit - Grid is not reloading - what am I missing?
body: <p>I had grid reloading working after form submit in a popup, but now I've changed stuff around and for some reason it stopped working and can't figure out why...</p>
  
  <p>EDIT: See comment below...</p>
  
  <p>Basically, the 'details' page used to not be a subpage of this page but a separate .php file, I prefer the subpage approach, but I must have screwed up somewhere in the transition...
  I've edited out some stuff that would only make this harder to read.</p>
  
  <p>Does anyone see what I'm missing or where I'm going wrong?  </p>
  
  <pre><code>class page_liststuff extends Page {
      function initMainPage(){
      // parent::init();
  
      $grid = $this-&gt;add('Grid');
      $this-&gt;js('reload_grid',$grid-&gt;js()-&gt;reload());
  
  $grid-&gt;addColumn('button','edit');
  $grid-&gt;addButton('Refresh')-&gt;js('click', $grid-&gt;js()-&gt;reload());
  
  if($_GET['edit']){
      $this-&gt;js()-&gt;univ()-&gt;frameURL('Edit',$this-&gt;api-&gt;url('details'))-&gt;execute();
  }
  
  }
  
  function defaultTemplate(){
      return array('page/detail');
  }
  
  function page_details(){
  
      $m = $this-&gt;setModel('Stuff');
  $f1 = $stap1-&gt;add('Form');
  $f1-&gt;addSubmit('Save');
  
  if ($f1-&gt;isSubmitted()){
      try {
              $f1-&gt;update();
      $f1-&gt;js()-&gt;univ()
      -&gt;successMessage('Success!')
      //-&gt;closeDialog()
      -&gt;getjQuery()-&gt;trigger('reload_grid')
      -&gt;execute();
  
          } catch(Exeception $e) {
              $f1-&gt;js()-&gt;univ()-&gt;alert('Fail!')-&gt;execute();
          }
  }
    }
  
  }
  </code></pre>