Hakan Ardo > DBIx-HTMLView-LATEST > DBIx::HTMLView::Id

Download:
DBIx-HTMLView-LATEST.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source  

NAME ^

  DBIx::HTMLView::Id - A index field used to identify posts

SYNOPSIS ^

  $fld=$post->fld('id');
  print $fld->view_html;

DESCRIPTION ^

This is a subclass of DBIx::HTMLView::Field used to represent the id fields of a table in the databse as well as the data contained in it. See the DBIx::HTMLView::Field and DBIx::HTMLView:.Fld (the superclass of Field) manpage for info on the methods of this class.

Each post must have an unique id number which the HTMLView system uses to identify the post. The id has to be stored in the database in a field which is specifyed by this class in the DBIx::HTMLView::Table object used to represent the table. There should only be one Id field.

If you try to generate an html editor using the edit_html method this Fld will return a <input type=hidden ...> field that is used in the form to specify which post is being edited.

This behaviour of not allowing the user to edit the id should probably not be modified as the id might be stored in other places (for eaxample relations) too, and has to be updated there too.

syntax highlighting: