Akelos Framework v1 forum archive. This forum is no longer maintained. To report bugs please visit https://github.com/akelos/akelos/issues
    • CommentAuthorsuthern
     

    Howdy! While going through demos on www.script.aculo.us I ran across the auto_complete series. The simple one at http://demo.script.aculo.us/ajax/autocompleter looked interesting, so I thought I'd see if akelos supported it.

    Upon searching through the akelos code, ( source: javascript_macro_helper.php line:221) I found I could put something like

    <?= $javascript_macros_helper->text_field_with_auto_complete('spot','loc_code') ?>
    

    In my view.tpl (which renders a nice text box). The same location in the _helper file said I needed to put "auto_complete_for_object_method" in the controller to handle the ajax calls. Is there anywhere I can find more details on this? What kind of augments are provided to the function auto_complete_for_spot_find_spot(??), and what exactly do I need to return? a render_partial for each row? Thanks for any tips!

    • CommentAuthorsuthern
     

    And if I would have read the javascript_macro_helper a little better, I would have seen this example only a few lines above it. Posted here for completeness sake.

      function auto_complete_for_item_title()
      {
        $this->items = $Item->find('all', array('conditions' => array('strtolower($description).' LIKE ?', '%' . strtolower($this->_controller->Request->getRawPostData(). '%' ))))
        return $this->_controller->render(array('inline'=> '<?= $javascript_macros->auto_complete_result(@$items, 'description') ?>'));
      }
    
    • CommentAuthorVBharathi
     
    Hi,
    I dont understand this akelos .So i want the one example program with using all kind of features.
    •  
      CommentAuthorbermi
     

    @VBharathi, you should not be repeating the same off-topic questions on every single thread of this forum.

    @suthern To tell the truth I've never used the script.aculo.us and JavaScript macros helpers as I trend to code using css selectors and attaching behaviors via JavaScript... I will give it a try now that we have erb syntax in Sintags :)

    Salavert ported this feature to Akelos, so he might be the able to help you on this one.

    Meanwhile I'll submit a ticket for adding proper unit tests for this functionality.

    • CommentAuthorsuthern
     

    Thanks Bermi.

    I haven't got ajax working yet, but be assured that when I do get it working I'll update the thread. ;-)