internal package Foswiki::Plugins::EditTablePlugin::EditTableData

See PublishedAPI for packages intended to be used by Plugin and Contrib authors, or browse all packages.
See also Developing plugins, Developer's Bible, Technical Overview

getTableStatistics( $changesMap ) -> \$statistics

Creates a 'statistics' hash that shows the result of applying changes to the EditTableData object:
  • {rowCount} : the total number of rows, including header and footer rows
  • {added} : the added rows
  • {deleted} : the deleted rows
  • {bodyRowCount} : the number of body rows

StaticMethod _mergeHashes (\%a, \%b ) -> \%merged

Merges 2 hash references.

StaticMethod createTableChangesMap( $paramString ) -> \%map

Parses the paramString to a hash. paramString can contain a list of key-value pairs using the structure (rowNumber_1=rowState_1,rowNumber_2=rowState_2,...), for example:

  1. =0,1=0,2=1

Row states are:
row deleted
nothing changed
row added
reset (no action)

Not all rows have to be present in the param.

StaticMethod tableChangesMapToParamString( \%tableChanges ) -> $paramString

In the reverse operation to createTableChangesMap, converts a tableChanges hash to a param string.

For example, { '0' => '0', '3' => '1' } will be converted to: '0=0,3=1'

StaticMethod _getTableChangeStatistics

Topic revision: r1 - 19 Apr 2011, ProjectContributor
This site is powered by FoswikiCopyright © CC-BY-SA by the contributing authors. All material on this collaboration platform is copyrighted under CC-BY-SA by the contributing authors unless otherwise noted.
Ideas, requests, problems regarding Foswiki? Send feedback