jm wrote:
> What's the easiest way to determine if a method is being called directly
> from a client (web browser) or embedded as a sub component as part of
> another call?
Had a thought about this just as I'm about to walk out the door. Would
something like the following, untested code, be a good way to do this?
is_embedded(A, Module) ->
EWC = erlyweb:get_ewc(A),
error_logger:info_msg("ewc => ~p, ~p~n",
[element(2, EWC), element(3, EWC)]),
case EWC of
{ewc, Controller, View, _FuncName, _Params} when
Controller =:= Module orelse
View =:= Module -> false;
_ -> true
end.
Jeff.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---