GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  HTML::SHAKAN::MODEL::DATAMODEL (3)

.ds Aq ’

NAME

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

CONTENTS

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
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 HTML::SHAKAN::MODEL::DATAMODEL (3) 2016-04-03

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.