| 1 | package HTML::GUI::table::basic; | ||
| 2 | |||
| 3 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | =head1 NAME | ||
| 7 | |||
| 8 | HTML::GUI::table::basic - Create and control a whole table::basic for web application | ||
| 9 | |||
| 10 | =head1 VERSION | ||
| 11 | |||
| 12 | Version 0.01 | ||
| 13 | |||
| 14 | =cut | ||
| 15 | |||
| 16 | our $VERSION = '0.01'; | ||
| 17 | |||
| 18 | 0 | ▶ | use HTML::GUI::widget; |
|
Subroutine
BEGIN: called CC=1 SCAR=2.6
| |||
| 19 | use UNIVERSAL qw(isa); | ||
| 20 | our @ISA = qw(HTML::GUI::widget); | ||
| 21 | use Log::Log4perl qw(:easy); | ||
| 22 | |||
| 23 | |||
| 24 | |||
| 25 | =head1 TABLE::BASIC | ||
| 26 | |||
| 27 | A simple object to create tables | ||
| 28 | |||
| 29 | =cut | ||
| 30 | |||
| 31 | |||
| 32 | |||
| 33 | =head1 PUBLIC METHODS | ||
| 34 | |||
| 35 | =pod | ||
| 36 | |||
| 37 | =head3 new | ||
| 38 | |||
| 39 | create a new table::basic | ||
| 40 | |||
| 41 | =cut | ||
| 42 | |||
| 43 | sub new | ||
| 44 | { | ||
| 45 | my($class, $params) = @_; | ||
| 46 | |||
| 47 | my $this = $class->SUPER::new($params); | ||
| 48 | return undef unless defined $this; | ||
| 49 | |||
| 50 | bless($this, $class); | ||
| 51 | return $this; | ||
| 52 | } | ||
| 53 | |||
| 54 | |||
| 55 | |||
| 56 | =pod | ||
| 57 | |||
| 58 | =head3 getDefinitionData | ||
| 59 | |||
| 60 | Specialization of the widget.pm function | ||
| 61 | |||
| 62 | =cut | ||
| 63 | sub getDefinitionData($;$$$) | ||
| 64 | { | ||
| 65 | my ($self,$paramPublicProp,$paramDefaultValue, $paramPublicPropList) = @_; | ||
| 66 | |||
| 67 | my @widgetsDefinitionList = () ; | ||
| 68 | |||
| 69 | my $publicProp = $self->SUPER::getDefinitionData($paramPublicProp,$paramDefaultValue, $paramPublicPropList); | ||
| 70 | |||
| 71 | return $publicProp; | ||
| 72 | } | ||
| 73 | |||
| 74 | |||
| 75 | =pod | ||
| 76 | |||
| 77 | =head3 validate | ||
| 78 | |||
| 79 | Return : | ||
| 80 | return 1 if no field of the table::basic break no constraint | ||
| 81 | return 0 if one or more field break constraint | ||
| 82 | |||
| 83 | =cut | ||
| 84 | |||
| 85 | sub validate | ||
| 86 | { | ||
| 87 | my($self) = @_; | ||
| 88 | my $OK = 1; | ||
| 89 | return $OK; | ||
| 90 | } | ||
| 91 | |||
| 92 | |||
| 93 | =pod | ||
| 94 | |||
| 95 | =head3 getValueHash | ||
| 96 | |||
| 97 | Description : | ||
| 98 | get all the values stored in the table::basic | ||
| 99 | Return : | ||
| 100 | a ref to a hash containing the value associated to each input id | ||
| 101 | |||
| 102 | =cut | ||
| 103 | |||
| 104 | sub getValueHash | ||
| 105 | { | ||
| 106 | my($self) = @_; | ||
| 107 | my %values=(); | ||
| 108 | return \%values; | ||
| 109 | } | ||
| 110 | |||
| 111 | =pod | ||
| 112 | |||
| 113 | =head3 setValueFromParams | ||
| 114 | |||
| 115 | Description : | ||
| 116 | set the value of the widgets of the table::basic for which a value fits in $params hash; | ||
| 117 | Return : | ||
| 118 | nothing | ||
| 119 | |||
| 120 | =cut | ||
| 121 | |||
| 122 | sub setValueFromParams | ||
| 123 | { | ||
| 124 | my($self,$params) = @_; | ||
| 125 | # TODO !! | ||
| 126 | } | ||
| 127 | |||
| 128 | =pod | ||
| 129 | |||
| 130 | =head3 setValue | ||
| 131 | |||
| 132 | Description : | ||
| 133 | set the value of the widgets of the table::basic for which a value fits in $params hash; | ||
| 134 | |||
| 135 | Parameters : | ||
| 136 | $valueHash : a hash ref of the same form as the function getValueHash returns | ||
| 137 | |||
| 138 | Return : | ||
| 139 | nothing | ||
| 140 | |||
| 141 | =cut | ||
| 142 | |||
| 143 | sub setValue | ||
| 144 | { | ||
| 145 | my($self,$valueHash) = @_; | ||
| 146 | # TODO !! | ||
| 147 | } | ||
| 148 | |||
| 149 | |||
| 150 | =head3 getHtml | ||
| 151 | |||
| 152 | Return : | ||
| 153 | a string containing the html of the widget contained in the table::basic. | ||
| 154 | |||
| 155 | =cut | ||
| 156 | |||
| 157 | sub getHtml | ||
| 158 | { | ||
| 159 | my($self ) = @_; | ||
| 160 | my $html = ""; | ||
| 161 | return $html; | ||
| 162 | } | ||
| 163 | |||
| 164 | =pod | ||
| 165 | |||
| 166 | =head3 DESTROY | ||
| 167 | The destructor to erase the ref to the parent | ||
| 168 | and avoid cycle references | ||
| 169 | |||
| 170 | =cut | ||
| 171 | |||
| 172 | sub DESTROY | ||
| 173 | { | ||
| 174 | my($self ) = @_; | ||
| 175 | |||
| 176 | delete $self->{parent}; | ||
| 177 | } | ||
| 178 | |||
| 179 | =head1 AUTHOR | ||
| 180 | |||
| 181 | Jean-Christian Hassler, C<< <jhassler at free.fr> >> | ||
| 182 | |||
| 183 | =head1 BUGS | ||
| 184 | |||
| 185 | Please report any bugs or feature requests to | ||
| 186 | C<bug-gui-libhtml-table::basic at rt.cpan.org>, or through the web interface at | ||
| 187 | L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=HTML-GUI-widget>. | ||
| 188 | I will be notified, and then you'll automatically be notified of progress on | ||
| 189 | your bug as I make changes. | ||
| 190 | |||
| 191 | =head1 SUPPORT | ||
| 192 | |||
| 193 | You can find documentation for this module with the perldoc command. | ||
| 194 | |||
| 195 | perldoc HTML::GUI::widget | ||
| 196 | |||
| 197 | You can also look for information at: | ||
| 198 | |||
| 199 | =over 4 | ||
| 200 | |||
| 201 | =item * AnnoCPAN: Annotated CPAN documentation | ||
| 202 | |||
| 203 | L<http://annocpan.org/dist/HTML-GUI-widget> | ||
| 204 | |||
| 205 | =item * CPAN Ratings | ||
| 206 | |||
| 207 | L<http://cpanratings.perl.org/d/HTML-GUI-widget> | ||
| 208 | |||
| 209 | =item * RT: CPAN's request tracker | ||
| 210 | |||
| 211 | L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=HTML-GUI-widget> | ||
| 212 | |||
| 213 | =item * Search CPAN | ||
| 214 | |||
| 215 | L<http://search.cpan.org/dist/HTML-GUI-widget> | ||
| 216 | |||
| 217 | =back | ||
| 218 | |||
| 219 | =head1 ACKNOWLEDGEMENTS | ||
| 220 | |||
| 221 | =head1 COPYRIGHT & LICENSE | ||
| 222 | |||
| 223 | Copyright 2007 Jean-Christian Hassler, all rights reserved. | ||
| 224 | |||
| 225 | This program is free software; you can redistribute it and/or modify it | ||
| 226 | under the same terms as Perl itself. | ||
| 227 | |||
| 228 | =cut | ||
| 229 | |||
| 230 | 1; # End of HTML::GUI::table::basic | ||