Package DE_EPAGES::Presentation::UI::Object
Common user interface to show, save and delete objects.
Functions
- AddListToTray
- AddToTray
- BlockHistory
- BlockMonitor
- Button
- ClearPermission
- Delete
- DeleteFile
- DeleteFileReference
- DeleteListedObjects
- DeleteMultipleFiles
- DeleteTray
- DeleteTrayGroup
- ForwardURL
- MergeForm
- Monitor
- NewObject
- Save
- SaveOnList
- SetAttributeOnListedObjects
- SetCookiePopUp
- SetInheritChildren
- SetInvisible
- SetInvisibleListedObjects
- SetVisible
- SetVisibleListedObjects
- View
- ViewCached
- ViewNewObject
- _redirectoToNonSSLShopDomain
- addFormError
- attributeValues
- defaultValues
- 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 |
|
BlockHistory
Blocks the history entry of the view action.
Syntax |
$Handler->BlockHistory( $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 |
|
ClearPermission
set inherit flag and deletes all other permission on all children of object.
Syntax |
$Handler->ClearPermission( $Servlet ); |
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 |
|
DeleteFileReference
deletes file attribute value (not the image)
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 |
|
ForwardURL
Send 302 to client with given url. Does nothing without $URL.
Syntax |
$Handler->ForwardURL( $Servlet, $URL ); |
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 |
|
SetInheritChildren
set inherit flag on selected objects.
Syntax |
$Handler->SetInheritChildren( $Servlet ); |
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 |
|
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(); |
ViewCached
UI Action to view a object, this function tries to save the processed content at file system.
Syntax |
$Handler->ViewCached( $Servlet ); |
Input |
|
ViewNewObject
Returns the default attribute values for a new object.
Syntax |
$Handler->ViewNewObject( $Servlet ); |
Input |
|
Return |
|
_redirectoToNonSSLShopDomain
Rewrites the response header to do a 301 redirect to the real shop domain without SSL.
Syntax |
_redirectoToNonSSLShopDomain($Servlet); |
Input |
|
addFormError
add a form error to current form api.
Syntax |
$UI->addFormError($Error); $UI->addFormError($aError); |
Example |
$UI->addFormError(); # same as next line $UI->addFormError(GetError()) if ExistsError(); $UI->addFormError(['DirectoryNotFound', {'Directory' => $TargetDirectory }]); |
Input |
|
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 |
|
new
create new instance of UI. This method will be called by servlet, there is no need to call it again.
Syntax |
my $Handler = DE_EPAGES::Presentation::UI::Object->new(Servlet => $Servlet); |
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 |
|