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:
-1
row deleted
0
nothing changed
1
row added
2
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

This site is powered by FoswikiCopyright © by the contributing authors. All material on this site is the property of the contributing authors.
Ideas, requests, problems regarding AustLII Communities? Send feedback
This website is using cookies. More info. That's Fine