NAME
XML::XForms::Generator::Control
SYNOPSIS
use XML::XForms::Generator;
my $control = xforms_input( { class => 'someclass' },
caption => 'Username:',
help => 'Enter your username!' );
$control->setInstanceData( $model, '/username', 'dhageman' );
DESCRIPTION
The XML::LibXML DOM wrapper the XML::XForms::Generator module provides is based on convience functions for quick creation of XForms controls. These functions are named after the XForms control they create prefixed by 'xforms_'. The result of 'xforms_' convience functions is an object with all of the methods available to a standard XML::LibXML::Element along with all of the convience methods listed further down in this documentation under the METHODS section.
Each XForms control function takes a hash reference to set of name => value pairs that describe the control's attributes and set of name => value pairs that are associated with a controls child elements.
XFORMS CONTROLS
button - Generates a button
choices - optgroup replacement
input - Simple text entry box
item - Wrapper for a value and caption
itemset - Collection of items
output - Display instance data
range - Selection of a set of contiguous data
secret - "Password" entry box
selectMany - Multi-selection box
selectOne - Selection box
submit - Submit button
textarea - Large text entry box
upload - Control for file uploads
value - Data part of an item
METHODS
- setAction ( { ATTRIBUTES }, @CHILDREN )
-
Convience method to set the alert child of a control. This method takes a reference to a hash of name => value pairings for the attributes and an array of XML::LibXML enable DOM data or text. Please note that if an attribute is given that is not part of the XForms specification that it will be ignored.
- setActions ( { ATTRIBUTES }, @CHILDREN )
-
Convience method to set the alert child of a control. This method takes a reference to a hash of name => value pairings for the attributes and an array of XML::LibXML enable DOM data or text. Please note that if an attribute is given that is not part of the XForms specification that it will be ignored.
- setAlert ( { ATTRIBUTES }, @CHILDREN )
-
Convience method to set the alert child of a control. This method takes a reference to a hash of name => value pairings for the attributes and an array of XML::LibXML enable DOM data or text. Please note that if an attribute is given that is not part of the XForms specification that it will be ignored.
- setCaption ( { ATTRIBUTES }, @CHILDREN )
-
Convience method to set the caption child of a control. This method takes a reference to a hash of name => value pairings for the attributes and an array of XML::LibXML enable DOM data or text. Please note that if an attribute is given that is not part of the XForms specification that it will be ignored.
- setExtension ( { ATTRIBUTES }, @CHILDREN )
-
Convience method to set the extension child of a control. This method takes a reference to a hash of name => value pairings for the attributes and an array of XML::LibXML enable DOM data or text. Please note that if an attribute is given that is not part of the XForms specification that it will be ignored.
- setHelp ( { ATTRIBUTES }, @CHILDREN )
-
Convience method to set the help child of a control. This method takes a reference to a hash of name => value pairings for the attributes and an array of XML::LibXML enable DOM data or text. Please note that if an attribute is given that is not part of the XForms specification that it will be ignored.
- setHint ( { ATTRIBUTES }, @CHILDREN )
-
Convience method to set the hint child of a control. This method takes a reference to a hash of name => value pairings for the attributes and an array of XML::LibXML enable DOM data or text. Please note that if an attribute is given that is not part of the XForms specification that it will be ignored.
- setInstanceData ( MODEL, BIND_REF, @DATA )
-
This method takes a XML::XForms::Generator::Model object as its first argument, a very very basic XPath statement for the instance data location and finally it takes an array of XML::LibXML capable nodes and/or text.
AUTHOR
D. Hageman <dhageman@dracken.com>
SEE ALSO
XML::XForms::Generator
XML::XForms::Generator::Action
XML::XForms::Generator::Model
XML::LibXML
XML::LibXML::DOM
COPYRIGHT AND LICENSE
Copyright (c) 2000-2001 D. Hageman (Dracken Technologies). All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.