Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
HTML::Shakan::Model::DUseroContributed Perl DHTML::Shakan::Model::DataModel(3)

NAME
       HTML::Shakan::Model::DataModel -	Data::Model bindings for Shakan

SYNOPSIS
	   # in	edit form
	   my $form = HTML::Shakan->new(
	       model =>	'DataModel'
	   );
	   my $row = $dm->lookup('any_table', 1);
	   if ($form->submitted_and_valid) {
	       $form->model->update( $row );
	       redirect('/to/anywhere');
	   } else {
	       $form->model->fill( $row	);
	       render_template({form =>	$form, row => $row});
	   }

	   # add form
	   my $form = HTML::Shakan->new(
	       model =>	'DataModel'
	   );
	   if ($form->submitted_and_valid) {
	       $form->model->create( $model, 'user' );
	       redirect('/to/anywhere');
	   } else {
	       $form->model->fill( $row	);
	       render_template({form =>	$form, row => $row});
	   }

DESCRIPTION
       wrapper class for Data::Model & HTML::Shakan

METHODS
       $form->model->fill($row)
	   fill	this row to form

       $form->model->create($model => $name);
	   insert new row.

       $form->model->update($row);
	   update this row

SEE ALSO
       Data::Model

perl v5.32.0			  2020-08-17 HTML::Shakan::Model::DataModel(3)

NAME | SYNOPSIS | DESCRIPTION | METHODS | SEE ALSO

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=HTML::Shakan::Model::DataModel&sektion=3&manpath=FreeBSD+12.2-RELEASE+and+Ports>

home | help