ePages 6.11.0 - DE_EPAGES/Presentation/UI/JSON.pm

Package DE_EPAGES::Presentation::UI::JSON

Common user interface to show, save and delete objects.

Functions

JSONAdvancedLinks
JSONChildren
JSONGet
JSONGetBaseUrl
JSONGetFeature
JSONPublicFiles
JSONViewResponse
writeContentOutput

JSONAdvancedLinks

Returns the AdvancedLinks for the Linkcreator Widget

Syntax
$Handler->JSONAdvancedLinks( $Servlet );
Input
$Servlet (object)
current servlet (contains form data)

JSONChildren

Reads children of servlet object. DE_EPAGES::Presentation::API::Constants::BASIC_JSON_ATTRIBUTES and 'hasChildren' are the keys for each child. Writes the json content direct to the servlet.

Syntax
$Handler->JSONChildren( $Servlet );
Input
$Servlet (object)
current servlet (contains form data)

JSONGet

Reads given comma separated 'Attributes' from servlet object. Possible syntax: Attribute reads and responds as attribute "Attribute" ReturnName=AttributeName reads attribute "AttributeName" but responds it as "ReturnName" ReturnName=Attribute.SubAttribute reads attribute "SubAttribute" from object attribute "Attribute" and returns it as "ReturnName" Writes the JSON content directly to the servlet.

Syntax
$Handler->JSONGet( $Servlet );
Input
$Servlet (object)
current servlet (contains form data)

JSONGetBaseUrl

Returns the current BaseUrl (baseLineContentLocation) for the currently logged in user (with security token). Writes the json content direct to the servlet.

Syntax
$Handler->JSONGetBaseUrl( $Servlet );
Input
$Servlet (object)
current servlet (contains form data)

JSONGetFeature

Reads given 'Features' from servlet object. Writes the json content direct to the servlet.

Syntax
$Handler->JSONGetFeature( $Servlet );
Input
$Servlet (object)
current servlet (contains form data)

JSONPublicFiles

Reads public files of servlet object. Writes the json content direct to the servlet.

Syntax
$Handler->JSONPublicFiles( $Servlet );
Input
$Servlet (object)
current servlet (contains form data)

JSONViewResponse

Writes servlet vars ResponseErrors and ResponseContent to servlet.

Syntax
$Handler->JSONViewResponse( $Servlet );
Input
$Servlet (object)
current servlet (contains form data)

writeContentOutput

Writes the json content direct to the servlet.

Syntax
$Handler->writeContentOutput( $rContent );
Example
my $Object = $Servlet->object;
return $self->writeContentOutput($Object->get([qw (Alias NameOrAlias ObjectID Position)]));
Input
$rContent (ref)
data