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 XML
tags into the
partial. (Duh.)
Thanks!
-Rakesh
On 12/27/05, Rakesh Malik
<tamerlin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:>
> I''m trying to get a Rico LiveGrid working, and I am a bit stuck on
how to
> 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, and
> it''s clearly not what I''m getting
> from the XML-RPC partial.
>
> What I have looks like this:
> <methodResponse>
> <params>
> <param>
> <value>
> <array>
> <data>
> <value>
> <struct>
> <member>
> <name>field1</name>
> <value>
> .
> .
> .
>
> 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| %>
> <tr>
> <td class="cell"> <%= item.field1 %>
> <td>
> <td class="cell"> <%= item.field2 %>
> <td>
> <td class="cell"> <%= item.field3 %>
> <td>
> </tr>
> <% end %>
>
> And the LiveGrid tutorial describes this:
> <ajax-response>
> <response type=''object''
id=''data_grid_updater''>
> <rows update_us=''true>
> <tr...
>
> 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
> partial?
>
> Thanks!
>
> -Rakesh
>
> (The book recommened on the Rico site is on order and hasn''t
shipped yet.)
>
_______________________________________________
Rails mailing list
Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails