1 %# This component checks if the client is in the correct state to read
2 %# a response from the server ('can_receive'). If this is the case,
3 %# it fetches the server response, analyzes the output and dispatches
4 %# the response to the most specific rendering component available.
7 if ($session_context->{client}->get_communication_state()
9 my $response = $session_context->{client}->collect();
10 my $service_msg = $response->{SERVICE_MSG};
14 if ($service_msg eq 'COMMAND') {
15 # offload this to a COMMAND renderer
16 $comp_path = '/Renderer/Command';
17 $command = $response->{COMMAND};
19 # process service message response
20 $comp_path = '/Renderer/Service',
21 $command = $service_msg;
25 $m->comp("$comp_path/$command.mhtml",
26 response => $response);
29 $context{debug}("Eval error: $EVAL_ERROR");
30 $m->comp("$comp_path/default.mhtml",
31 response => $response);
39 my $session_context = $m->comp('/lib/getsession.mhtml', %ARGS);