Pagination on modal window


#1

Dear all,

I have implemented a modal window for selection of user. How i can
implement pagination for modal window. I have used the following
controller method for displaying user in modal window

def user_search

@user_list = UserInfo.find( :all,:page => {:current =>

@page_current,
:size => 10 }, :conditions => [‘id != ?’,
1])

render :update do |page|

  page.show "userlist"

  page.replace_html "userlist", :partial =>'user_list', :locals =>

{:userlist => @user_list}

  page << "showModal('contatiner_sub','userlist')"

end

end

_user_list.rhtml:

  <% userlist.each do |user_list| %>

    <%=radio_button_tag

‘user_name_1’,"#{user_list.id}"%><%=user_list.first_name%>

    <%= observe_field("user_name_1_#{user_list.id}",
    :on => "changed",
    :url => {:action => :update_user, :id => user_list.id},
    :with => "'user_name='+value")
    %>

  <% end %>

</div>
<div id='pagination'>
     <%= render :partial => '/application/pagination',
          :locals =>
            { :collection =>  userlist,
              :action => 'user_search',
              :id => nil
              }  -%>

</div>

Please suggest on above code for implementing pagination in modal
window. Pagination works fine in all my normal lists but in modal window
it does,nt work. Please suggest.

Thanks in advance

Regards,
Jose Martin