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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---