tuple

Description

wpart_tuple is some kind of aggregate of elements. Instead of grouping several (fixed number) inputs into one tuple (in order to save them into the DB) in the controller, we can group them inside wpart_tuple and store + validate together. The value kept in the database is a tuple of the basic elements (strings/tuples/atoms).

There are as many rendered widgets as declared tuple's length is. Each of the widgets is of the type of the element's type.

Validators are the same as the basic elements ones.

HTML meta-attributes

name

format

description

type

"type_name1|type_name2|type_name3"

Specifies what is the type of the tuple elements. It also determines the length of the tuple. The successive elements are separated with a pipe character: |

Examples

Records definitions

...
{
},
...

HTML tag

<wpart:tuple type="string|string|date|text|float" OTHER_HTML_ATTRIBUTES />

Wparts/BasicTypes/tuple (last edited 2009-03-06 15:20:43 by Michal Ptaszek)