This should work if you return the following from the app controller:
{phased, {ewc, A},
fun(_Ewc, Data, _Vars) ->
CC = yaws_api:setcookie("testme", pid_to_list(P), "/"),
{response, [CC | {body, {ewc, html_container, [A, Data]}}]}
end}
If the requested component doesn't return a redirect, its results are
put in html_container and returned together with the cookie.
Yariv
On Mon, Apr 28, 2008 at 4:14 AM, Smok <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I just wanted to put session handling routine in the hook method of
> app_controler and I stuck on the following problem.
> I want to set cookie and continue to render components.
> To achieve this I do the following:
>
> ....
> CC = yaws_api:setcookie("testme", pid_to_list(P), "/"),
> {response, [CC, {body, {ewc, A}}]}.
>
> unfortunately if I make it like this cookie is not set.
>
> However if I change last line to
> {response, [CC]}.
>
> cookie is set, but of course further rendering is not continued.
>
> What do I do wrong?
>
> thanks,
> Artur
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---