Package DE_EPAGES::Presentation::UI::Object
Common user interface to show, save and delete objects.
Functions
- AddListToTray
- AddToTray
- BlockMonitor
- Button
- Delete
- DeleteFile
- DeleteListedObjects
- DeleteMultipleFiles
- DeleteTray
- DeleteTrayGroup
- MergeForm
- Monitor
- NewObject
- Save
- SaveOnList
- SetAttributeOnListedObjects
- SetCookiePopUp
- SetDebugSession
- SetInvisible
- SetInvisibleListedObjects
- SetTemplateTypeAttribute
- SetVisible
- SetVisibleListedObjects
- View
- ViewCached
- ViewCachedJS
- ViewNewObject
- _handleRedirect
- _testRedirectCondition
- attributeValues
- defaultValues
- getRedirectLocation
- listItems
- new
- object
- removeFile
- saveFile
- saveFileAttributes
- savePrivateFile
- servlet
- testObjectDeleteListedObjects
AddListToTray
Adds objects (listed by form Object.ListedObjects) to the tray (via DE_EPAGES::Presentation::API::Object::Tray::addObjectsToClassGroup).
Syntax |
$Handler->AddListToTray( $Servlet ); |
Input |
|
AddToTray
Adds current object to the tray (via DE_EPAGES::Presentation::API::Object::Tray::addObjectsToClassGroup).
Syntax |
$Handler->AddToTray( $Servlet ); |
Input |
|
BlockMonitor
Blocks appearance of monitor.
Syntax |
$Handler->BlockMonitor( $Servlet ); |
Input |
|
Button
This function calls a new UI function by a pressed button of an html-form. Which buttons are allowed, is defined by form value ValidButton. No java-script is needed to select the real ChangeAction.
Syntax |
$Handler->Button( $Servlet ); |
Example |
<form href="?ChangeAction=Button"> <input type="hidden" name="ValidButton" value="Save" /> <input type="hidden" name="ValidButton" value="Delete" /> <input type="submit" name="Save" value="Save This" /> <input type="submit" name="Delete" value="Delete This" /> </form> |
Input |
|
Delete
Deletes the current object ($Servlet->object).
Discards the operation if user enables DeleteConfirmation and not
$Servlet->params('ACCEPT'). Sets the $Servlet->vars('DELETE',1) in this
case.
Syntax |
$Handler->Delete( $Servlet ); |
Input |
|
Return |
|
DeleteFile
Deletes a file from the public directory of the current object.. The attribute name of the file attribute is passed as form field with the name "File". The attribute value is set to undef.
Syntax |
$Handler->DeleteFile( $Servlet ); |
Input |
|
DeleteListedObjects
Deletes the selected objects. The object ids are passed in the form field 'ListObjectID'.
Syntax |
$Handler->DeleteListedObjects( $Servlet, $Class); |
Input |
|
DeleteMultipleFiles
Behaves like DeleteFile, but deletes a list of files via a given List of attribute names
Syntax |
$Handler->DeleteMultipleFiles( $Servlet ); |
Input |
|
DeleteTray
Removes tray of current session.
Syntax |
$Handler->DeleteTray( $Servlet ); |
Input |
|
DeleteTrayGroup
Removes tray group (indentified via form value 'TrayGroupID') of current session.
Syntax |
$Handler->DeleteTrayGroup( $Servlet ); |
Input |
|
MergeForm
Merges the serialized values of form field "SerializedForm" to the current Form and Servlet vars. This is very useful for wizards with unknown form element names. Last submitted values and default values like ObjectID, ViewAction, etc. are not overwritten or added. You have to submit the last (serialized) form via #INPUT.SerializedForm on each page using this action.
Syntax |
$Handler->MergeForm( $Servlet ); |
Input |
|
Monitor
Reads the response of an previous appeared (form value GUID) monitor.
Syntax |
$Handler->Monitor( $Servlet ); |
Input |
|
NewObject
Creates a new object and sets the attribute values.
Syntax |
$NewObject = $Handler->NewObject( $Servlet ); $NewObject = $Handler->NewObject( $Servlet, $Parent ); $NewObject = $Handler->NewObject( $Servlet, $Parent, $Class ); $NewObject = $Handler->NewObject( $Servlet, $Parent, $Class, $hAttributes ); |
Input |
|
Return |
|
Save
Saves the attributes of the current object ($Servlet->object).
Syntax |
$Handler->Save( $Servlet ); |
Input |
|
SaveOnList
Changes the attribute given with the $Name parameter to the value given in the $Value parameter for all objects in the ListedObjects form contained in the $Servlet object.
Syntax |
$Handler->SaveOnList( $Servlet, $Name, Value ); |
Example |
$self->SaveOnList($Servlet, "IsVisible", 1); |
Input |
|
SetAttributeOnListedObjects
sets the selected objects with given attribute value. The object ids are passed in the form field 'ListObjectID'.
Syntax |
$Handler->SetAttributeOnListedObjects( $Servlet, $AttributeName, $Value, $Permission); |
Input |
|
SetCookiePopUp
This function sets the session cookie PopUp.
Syntax |
$Handler->SetCookiePopUp( $Servlet ); |
Input |
|
SetDebugSession
UI Action to set / unset a JSDebugLevel to the user session
Syntax |
$Handler->SetDebugSession(); |
Input |
|
SetInvisible
sets the object invisible.
Syntax |
$Handler->SetInvisible( $Servlet ); |
Input |
|
SetInvisibleListedObjects
sets the selected objects invisible. The object ids are passed in the form field 'ListObjectID'.
Syntax |
$Handler->SetInvisibleListedObjects( $Servlet ); |
Input |
|
SetTemplateTypeAttribute
Sets any number of string attributes for a template type related to a certain object.
Syntax |
$Handler->SetTemplateTypeAttribute($Servlet); |
Example |
$self->SetTemplateTypeAttribute($Servlet); |
Input |
|
SetVisible
sets the object visible.
Syntax |
$Handler->SetVisible( $Servlet ); |
Input |
|
SetVisibleListedObjects
sets the selected objects visible. The object ids are passed in the form field 'ListObjectID'.
Syntax |
$Handler->SetVisibleListedObjects( $Servlet ); |
Input |
|
View
UI Action to view a object without any work.
Syntax |
$Handler->View(); |
Input |
|
ViewCached
UI Action to view a object, this function tries to save the processed content at file system.
Syntax |
$Handler->ViewCached( $Servlet ); |
Input |
|
ViewCachedJS
UI Action to access the jQuery configuration page type. Adds long-term cache header for caching the request in the browser cache.
Syntax |
$Handler->ViewCachedJS(); |
Input |
|
ViewNewObject
Returns the default attribute values for a new object.
Syntax |
$Handler->ViewNewObject( $Servlet ); |
Input |
|
Return |
|
_handleRedirect
Decides if we have to redirect to domain with SSL on NonSSL
Syntax |
_handleRedirect($Servlet); |
Input |
|
_testRedirectCondition
Decides if we have to redirect to shop/provider domain with SSL on NonSSL
Syntax |
_testRedirectCondition($Servlet); |
Input |
|
Return |
|
attributeValues
Checks the form values against the type and range specification of the
given class and the formatters of the given object.
Note: Call $Servlet->form->executeFormError() to abort processing in
case of input errors.
You can override this function to perform additional tests. To call the
default implementation, use $self->SUPER::attributeValues(@_).
Syntax |
$hhValues = $Handler->attributeValues( $Servlet, $Object, $Class, $Prefix ); |
Example |
$hhValues = $Handler->attributeValues( $Servlet, $Object, $Class, 'Address.' ); $Form->executeFormError; |
Input |
|
Return |
|
defaultValues
Returns the default attribute values for new objects of a specified class as TLE hash.
Syntax |
$hValues = $Handler->defaultValues($Parent, $Class); |
Input |
|
Return |
|
getRedirectLocation
Get the address to do a 301 redirect to the shop or provider domain with/without SSL.
Syntax |
getRedirectLocation($Servlet); |
Input |
|
Return |
|
listItems
Returns a list of objects and position values. Tests if the current user has permission to save these objects. The permission test is only for objects (SubClass of 'Object' class). If the LineItem object doesn't exist, it will be ignored ignored.
Syntax |
$ahListItems = $self->listItems( $Servlet, $Object, $ClassAlias ) $ahListItems = $self->listItems( $Servlet, $Object, $ClassAlias, $ActionAlias ) |
Input |
|
Return |
|
new
create new instance of UI. This method will be called by servlet, there is no need to call it again.
Syntax |
$Handler = DE_EPAGES::Presentation::UI::Object->new(%options); |
Example |
$Handler = DE_EPAGES::Presentation::UI::Object->new(Servlet => $Servlet); |
Input |
|
Return |
|
object
Returns the object on which the current action operates.
Syntax |
$Object = $UI->object; |
Return |
|
removeFile
Deletes a file from the server.
Syntax |
$Handler->removeFile( $Servlet, $Object, $Name ); $Handler->removeFile( $Servlet, $Object, $Name, $LanguageID ); |
Input |
|
saveFile
Saves an uploaded file on the server. Returns the file name relative to object directory $Object->get('PublicPath').
Syntax |
$FileName = $Handler->saveFile( $Servlet, $Object, $Name ); $FileName = $Handler->saveFile( $Servlet, $Object, $Name, $Index ); |
Input |
|
Return |
|
saveFileAttributes
Saves attribute value of type File and LocalizedFile. Saves the files to the directory $Object->get('PublicPath').
Syntax |
$Handler->saveFileAttributes( $Servlet, $Object, $hhValues ); |
Input |
|
savePrivateFile
Saves an uploaded file on the server. Returns the file name relative to object directory $Object->get('PrivatePath').
Syntax |
$FileName = $Handler->savePrivateFile( $Servlet, $Object, $Name ); $FileName = $Handler->savePrivateFile( $Servlet, $Object, $Name, $Index ); |
Input |
|
Return |
|
servlet
Returns the servlet, which calls the current action.
Syntax |
$Servlet = $UI->servlet; |
Return |
|
testObjectDeleteListedObjects
Returns the object to test the Delete permission (this function returns the Object).
Syntax |
$PermissionObject = $Handler->testObjectDeleteListedObjects( $Object ); |
Input |
|
Return |
|