Use.pm


NAME

Communiware::DE::Use - Dynamic element Use


SYNOPSIS

   <:Use attribute expression [condition]:>


DESCRIPTION

Dynamic element use may occur in Post form instead of hidden form element. It allows to set value of some item attribute or link from value of other context attribute including attributes of peer Item containers.

If some parameter defined both by Input/EditField dynamic element, and with Use, Use takes precedence and completely overrides user input, unless condition is specified and is not satisfied.

If multiple Use dynamic elements with same name occurs in same container, their results are treated as element of list (useful only for setting links)

First argument of this element is name of any parameter which would be interpreted by some handler - not only item attribute or link type, but special fields like PICNAME or FORMAT, or attributes of subscription. Only UPLOAD and PICx field cannot be calculated using Use.

See Communiware::Expr documentation for allowed terms and operations in expressions.

Both submit-time and visualisation time substitution is allowed in the arguments of Use.

Optional condition argument may be either ifabsent or ifempty.

ifabsent means ``perform computation of parameter only if was not provided from HTTP request'', i.e. posting form did not send field with this name at all (it can be a case if there is a unchecked checkbox with this name).

ifempty means ``perform comutation if parameter doesn't exists or has empty value.

16 октябрь 2007 13:44