hi people!
I have a view like this:
# list.rhtml
<form id="search">
<ul style="list-style: none;">
<div id="searchfields">
<%= render "contacts/search_fields" %>
</div>
<div id="trash">
trash me
</div>
</ul>
<%= drop_receiving_element "search",
:update => "searchfields", :url => { :action =>
"add_search_field" } %>
<%= drop_receiving_element "trash",
:update => "searchfields", :url => { :action =>
"remove_search_field" } %>
</form>
</div>
and another view that is the ''ajax'' rendered view:
# search_fields.rhtml
<% session[:search_fields].each do |field, surely_empty| %>
<span id="<%= field %>"><li><label
for="<%= field %>"><%= field %>:</label><%=
text_field_tag field %></li></span>
<%= draggable_element field, :revert => true %>
<% end %>
add_search_field and remove_search_field are removing from the session a field
and search_fields.rhtml as you see reprints all the fields
I want to trash a field by moving it to the trash div.
steps are the following:
I have a table with a <%= draggable_element column.human_name.downcase,
:revert => true %> and if I drag it to search_fields (it calls
add_search_field in the controller) it works and renders correctly.
then if I try to drag the newly added field to trash I''m unable to do
it because it doesn''t drag. If I reload the page and then drag&drop
it works.
what am I missing?
thanks!
a hack that could be done, but I don''t know how to do it is to force
the reload
of the entire page
ciao,
Marco
--
,= ,-_-. =.
((_/)o o(\_)) jabber:kpanic@jabber.linux.it/msn:kpanic@muppetslab.org
`-''(. .)`-'' online on #muppetslab at irc.freenode.net
\_/ There''s no one inside that flat, everybody knows it