Erlang Mailing Lists

Author Message

<  Erlyweb mailing list  ~  updates

Guest
Posted: Sun Nov 25, 2007 2:10 am Reply with quote
Guest
Hi,

I checked in some changes in trunk:

1) Implemented {phased_vars, Vars} response tuple.

For example, you can return the following:

{response, [{phased_vars, [{title, "foo"}]}, {body, Ewc}]}.

For example, to use the 'title' value in the 'phased' fun, you can
return this from the app_controller:hook/1:

{phase, {ewc, A},
fun(A, Data, Vars) ->
{ewc, html_container, [A, {data, Data}, proplists:get_value(title, Vars)]}
end}

NOTE: this change will break existing apps that use the 'phased'
feature. To port exising apps to the new code, just add the third
parameter to your 'phased' fun and feel free to ignore it.

2) Set a 3 second threshold on auto-compilation. When auto_compile is
turned on, this greatly speeds up response time for pages that require
multiple requests due to images, etc.

3) ErlyWeb now treats that Ewc from {replace, Ewc} responses as a
component of equal level to the returning component rather than always
as a subcomponent. This means the Ewc can return headers, redirects,
phased vars, etc. if it replaces another top-level component (but not
another subcomponent).

Please let me know if you find this useful or if you find any problems.

Thanks,
Yariv

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "erlyweb" group.
To post to this group, send email to erlyweb@googlegroups.com
To unsubscribe from this group, send email to erlyweb-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Post recived from mailinglist

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum