NAME

XAO::DO::Web::FS - XAO::Web front end object for XAO::FS

SYNOPSIS

<%FS uri="/Categories/123/description"%>

<%FS mode="show-list"
     base.clipboard="cached-list"
     base.database="/Foo/test/Bars"
     fields="*"
     header.path="/bits/foo-list-header"
     path="/bits/foo-list-row"
%>

DESCRIPTION

Web::FS allows web site developer to directly access XAO Foundation Server from templates without implementing specific objects.

METHODS

FS provides a useful base for other displayable object that work with XAO::FS data.

get_object (%)

Returns an object retrieved from either clipboard or the database. Accepts the following arguments:

base.clipboard     clipboard uri
base.database      XAO::FS object uri
uri                XAO::FS object URI relative to `base' object
                   or root if no base.* is given

If both base.clipboard and base.database are set then first attempt is made to get object from the clipboard and then from the database. If the object is retrieved from the database then it is stored in clipboard. Next call with the same arguments will get the object from clipboard.

Here is the list of accepted 'mode' arguments and corresponding method names. The default mode is 'show-property'.

delete-property => delete_property (%)

Deletes an object or property pointed to by `name' argument.

Example of deleting an entry from Addresses list by ID:

<%FS
  mode="delete-property"
  base.clipboard="/IdentifyUser/customer/object"
  uri="Addresses"
  name="<%ID/f%>"
%>
show-hash => show_hash (%)

Displays a XAO::FS hash derived object. Object location is the same as described in get_object() method. Additional arguments are:

fields             comma or space separated list of fields that are
                   to be retrieved from each object in the list and
                   passed to the template. Field names are converted
                   to all uppercase when passed to template. For
                   convenience '*' means to pass all
                   property names (lists be passed as empty strings).
path               path that is displayed for each element of the list
show-list => show_list (%)

Displays an index for XAO::FS list. List location is the same as described in get_object() method. Additional arguments are:

fields             comma or space separated list of fields that are
                   to be retrieved from each object in the list and
                   passed to the template. Field names are converted
                   to all uppercase when passed to template. For
                   convenience '*' means to pass all
                   property names (lists be passed as empty strings).
header.path        header template path
path               path that is displayed for each element of the list
footer.path        footer template path

Show_list() supplies 'NUMBER' argument to header and footer containing the number of elements in the list.

At least 'ID' and 'NUMBER' are supplied to the element template. Additional arguments depend on 'field' content.

show-property => show_property (%)

Displays a property of the given object. Does not use any templates, just displays the property using textout(). Example:

<%FS uri="/project"%>

METHODS

No publicly available methods except overriden display().

EXPORTS

Nothing.

AUTHOR

Copyright (c) 2000-2001 XAO, Inc.

Andrew Maltsev <am@xao.com>.

SEE ALSO

Recommended reading: XAO::Web, XAO::DO::Web::Page.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 322:

You forgot a '=back' before '=head1'