NAME
XAO::DO::Web::Clipboard - clipboard value retrieval object.
SYNOPSIS
Currently is only useful in XAO::Web site context.
DESCRIPTION
Clipboard object is based on Action object (see XAO::DO::Web::Action) and therefor what it does depends on the "mode" argument.
For each mode there is a separate method with usually very similar name. The list below lists mode names and their method counterparts.
- 'set' => clipboard_set (%)
-
Sets a value in the clipboard. Example:
<%Clipboard mode='set' name='foo' value='bar'%>
If there is no 'value' argument it puts 'undef' into the clipboard, but does not remove the named record.
- 'show' => clipboard_show (%)
-
Displays clipboard parameter with the given "name". Example:
<%Clipboard mode="show" name="username" default="aa@bb.com"%>
Would display whatever is set in the Clipboard for variable "username" or "aa@bb.com" if it is not set.
- 'array-push' => clipboard_array_push (%)
-
Push a value into an array with the given "name". Example:
<%Clipboard mode='array-push' name='elements' value='Something'%>
Displays nothing.
- 'array-pop' => clipboard_array_pop (%)
-
Output the topmost element of the given array.
<%Clipboard mode='array-pop' name='elements'%>
If there is no array at that location, there is an empty array, or there is a non-array value, then there is no output.
- 'array-list' => clipboard_array_list (%)
-
Iterate over all array elements, displaying each element with the given template or path.
<%Clipboard mode='array-list' name='elements' template='<$VALUE$>'%>
- 'array-size' => clipboard_array_size (%)
-
Output the number of elements in the given array.
<%Clipboard mode='array-size' name='elements'%>
If there is no array at that location or there is a non-array value, then there is no output.
EXPORTS
Nothing.
AUTHOR
Copyright (c) 2003-2005 Andrew Maltsev
<am@ejelta.com> -- http://ejelta.com/xao/
Copyright (c) 2001 XAO Inc.
Andrew Maltsev <am@xao.com>, Marcos Alves <alves@xao.com>.
SEE ALSO
Recommended reading: XAO::Web, XAO::DO::Web::Page.