Forum: Ruby on Rails Help... Ajax scaffold problems

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Eric B. (Guest)
on 2006-04-07 23:54
(Received via mailing list)
Hi all,
Any help is appreciated.  I used the ajax scaffold generator to make 3
scaffoldings.  Then I put them together as components in a combined
and created a master controller, which happens to be named "dataentry'.
That works fine.

Within each of the components, I was able to set up links that paginate
update the div (for the component) with correctly paginated results.  So
links are able to call into my list action, run the code there, then
the appropriate div with the results.  However, what I can't seem to do
get the div to update or change without the request coming from a
the code which should cause the update is coming from the controller.

I'm trying to have requests go to the master controller, and cause the
components to update.

Data entry page:
<%=observe_field :search_text,:frequency =>1,:with => "'search_text=' +
escape(value)",:update=>:results,:url=>{:action =>:search }%>

<%= render_component :controller => 'mails', :action => 'list' %>
<%= render_component :controller => 'locations', :action => 'list' %>
<%= render_component :controller => 'listings', :action => 'list' %>

class DataEntryController < ApplicationController
   def search
             # search action calls component controllers
             redirect_to :controller=>'emails', :action => 'list'

class MailsController < ApplicationController
    def list

         # I have confirmed the redirect works  - it looks like the code
here runs
         # but no screen update happens for the component.
         # I want the code in here to update the div for mails, but
         # I don't know what code that should be to make the update
         # The .rhtml file is named list.  The search runs but
         # how do I tell it my results go in the div ???   No code that
have tried in here
         # seems to affect the component that displays the mails

     render :layout=>false


Any help is appreciated.  Thanks,

Eric B. (Guest)
on 2006-04-08 00:06
(Received via mailing list)
Eric B. wrote:

   <%= render_component :controller => 'mails', :action => 'list' %>


Note:  as submitted originally, the original said "emails" instead of
"mails".  That was not the problem...  just a typo from a minute ago
when I
considered renaming things.  Problem still exists...  arg...

This topic is locked and can not be replied to.