wiki:S3/S3HierarchyWidget

Version 6 (modified by Dominic König, 10 years ago) ( diff )

--

S3HierarchyWidget

Introduction

The S3HierarchyWidget class provides a drop-down options widget with a folder-tree style menu for hierarchical lookup fields.

It is used for both CRUD form widgets (both directly and inline link), as well as a filter widget (S3HierarchyFilter).

Python Widget Class

The S3HierarchyWidget (modules/s3/s3widgets.py) uses the S3Hierarchy toolkit to extract hierarchy information for the lookup table and to render it as a nested unsorted list (<ul>), then instantiates an s3.hierarchicalopts widget (static/scripts/s3/s3.jquery.ui.hierarchicalopts.js).

It is currently used in 3 different use-cases:

  • S3HierarchyWidget (directly as CRUD widget)
  • S3HierarchyFilter (filter widget)
  • S3SQLInlineLink (inline-widget to create link table entries to a hierarchical lookup table)

See S3/S3Hierarchy how to configure the hierarchy for the lookup table.

Currently, the S3HierarchyWidget does not yet support custom hierarchy data.

JQuery UI Widget

s3.hierarchicalopts (in static/scripts/S3/s3.jquery.ui.hierarchicalopts.js) is a JQuery UI widget that implements the folder-tree style appearance and the interactions with the hierarchical selector.

CSS Classes

  • tbw

See Also


Attachments (1)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.