Item.pm
NAME
Communiware::DE::Item - Dynamic element Item
SYNOPSIS
<:Post "" ....:> <:Item new(TYPE)|ITEM name condition:> <:EditField ... <:EndItem:> <:Item... ... <:EndPost:>
DESCRIPTION
Dynamic element Item provides container for individual item inside multi-item Post dynamic element. If Item occurs inside Post, no input field other than submit button may present outside Item container, and no ITEM_ID/new specifier should be in the first arg of Post dynamic element.
Multi-item Post doesn't create context, allowing Item to do so.
ARGUMENTS
- ITEM_ID or
new(TYPE_ID)
- specifies which Item to create/edit in this container.
- name
- Unique identifier of this container. If no one specified, it would be autogenerated. If specified, one may refer to values entered by user as attributes of this item from other Item containers using submit-time substituton. Syntax would be %{name.ATTRIBUTE}.
- condition
- Condition which should be satisfied in for this container to be processed at submit-time. Uses Communiware::Expr::eval_condition syntax.
-
If omitted, container is processed unconditionally.
compile
Parses arguments and passes them to generate.
generate
$code = generate($body,$post_spec,$name,@expr)
Recieves template fragment for body, posting specification (i.e. expression which would evaluate to posting specification run time), container name or empty string if name should be autogenerated, and expression.
Returns body of Item container, i.e. perl code which would generate neccessary set of hidden fields and form fragment itself.
eval_post_spec
Evaluates posting specification and returns set of hidden fields requred by posting container. Creates form context and set it as special_context('form');