internal package Foswiki::Plugins::JQDataTablesPlugin::Connector

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

internal package Foswiki::Plugins::JQDataTablesPlugin::Connector

base class for grid connectors used to feed a jqGrid widget

ClassMethod restHandleSave($request, $response)

this is called by the gridconnector REST handler based on the "oper" url parameter as provided by the GRID widget.

ClassMethod buildQuery($request) → $string

creates a query based on the current request

ClassMethod convertResult( %params ) → \%rows

convert a result to a rows for datatable.

params:

  • fields: list of fields to extract
  • result: result object (e.g. a solr document)
  • index: row number of the result being rendered
  • formDef (optional): form definition of all items in the result set

ClassMethod getValueOfResult( $doc, $property, $fieldDef ) → $value

get a property of a result document

ClassMethod search( %params ) → ($total, $totalFiltered, $data)

perform the actual search and fetch result

ClassMethod restHandleSearch($request, $response)

this is called by the connector REST handler based on the "oper" url parameter as provided by the Datatables widget.

ClassMethod getColumnDescription( $columnName, $formDef ) → \%desc

describe the kind of data for a column as available in the store. this returns a description has

{ type => "date|user|topic|formfield|default|image|icon|email|index|score|number", data => "...", # access to the raw data search => "...", # data that is being searched for sort => "...", # data in a sortable fashion }

ClassMethod getColumnsFromRequest( $request ) → @cols

read the request params and collect the column descriptions as transmitted by the Datatables client

ClassMethod translate($string, $web, $topic) → $string

translate string to user's current language

StaticMethod urlDecode( $text ) → $text

from Fowiki.pm

ClassMethod isValueMapped( $fieldDef ) → $boolean

should be in FieldDefinition

ClassMethod isProtected( $colname ) → $boolean

returns true if the column is supposed to be be protected

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