[Nitro] [PATCH] update morpher
George Moschovitis
george.moschovitis at gmail.com
Sun Sep 17 04:57:56 EDT 2006
Thanks,
this looks nice, but will please allow me to postpone the inclusion of
this patch for a bit. I want to think a bit better how the ajax stuff
is supposed to work on nitro.
best regards,
George.
On 9/13/06, Alexandre Gravem <vikingtux at gmail.com> wrote:
> it's the first patch i am submitting for the list. i hope it might be useful
> for someone :D
>
> the patch adds a new morpher similar to AsyncMorpher, but it updates an
> element using Prototype's Ajax.Updater. So if you have some template like
>
> <div id="mydiv"> </div>
> <a href="/some_action" update="mydiv">Click</a>
>
> the content of the "mydiv" div will be replaced with the compiled template
> of some_action. If you use it in a <form/> the elements of the form are
> serialized and sent, so you can acess them with request[] inside your
> controller like this
>
> #TEMPLATE
> Hello <span id="myname">Anonymous</span>
> <form action="/say_hello" update="myname">
> <input type="text" name="guest_name"/>
> ...
> </form>
>
>
> #CONTROLLER
> ...
> def say_hello
> print request['guest_name']
> end
> ...
>
>
> Cheers,
> A. Gravem
>
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
>
>
--
http://www.gmosx.com
http://www.nitroproject.org
More information about the Nitro-general
mailing list