Forum: Ruby on Rails Rails/Ajax question from a newbie (to both)

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.
Rakesh M. (Guest)
on 2005-12-27 23:37
(Received via mailing list)
I'm trying to get a Rico LiveGrid working, and I am a bit stuck on how
accomplish this.

I have a page that successfully queries a controller and updates a <div>
containing a table. I have two
versions of the action; one uses the render_partial to return a rendered
version of that table, and the
other returns an XML-RPC document, and this is where I hit a snag.

The Rico LiveGrid tutorial describes the XML schema it's looking for,
it's clearly not what I'm getting
from the XML-RPC partial.

What I have looks like this:

It does have the <xml version... /> tag at the top, btw.

It works fine with the code I have in the partial:
<% @results.each do |item| %>
    <td class="cell"> <%= item.field1 %>
    <td class="cell"> <%= item.field2 %>
    <td class="cell"> <%= item.field3 %>
<% end %>

And the LiveGrid tutorial describes this:
 <response type='object' id='data_grid_updater'>
  <rows update_us='true>

The rest is the table and closing tags. Of course, if you're experienced
with this stuff, you've probably
already seen that. :)

What's the best way to handle this issue? Should I modify the xml_rpc



(The book recommened on the Rico site is on order and hasn't shipped
Rakesh M. (Guest)
on 2005-12-28 00:10
(Received via mailing list)
Ok, replying to myself... but I think that the process of writing this
question helped, so I guess
it succeeded, but I was just missing the obvious approach of coding the
tags into the
partial. (Duh.)


This topic is locked and can not be replied to.