gws.plugin.model_widget.feature_list

Feature list widget.

Shows the related features of a relatedFeatureList, relatedMultiFeatureList or relatedLinkedFeatureList field as a list. Buttons to create a new related feature, link an existing one, edit, unlink or delete the selected one can be turned on and off. This is the default widget of feature list fields.

Example:

fields+ {
    name "pois"
    type "relatedFeatureList"
    toModel "model_poi"
    toColumn "category_id"
    widget { type "featureList" withDeleteButton true }
}

Source code: gws.plugin.model_widget.feature_list

Package Contents

class gws.plugin.model_widget.feature_list.Config

Bases: gws.base.model.widget.Config

List of related features.

withDeleteButton: bool = False

Show a button to delete the selected feature.

withEditButton: bool = True

Show a button to edit the selected feature.

withLinkButton: bool = True

Show a button to link an existing feature.

withNewButton: bool = True

Show a button to create a new related feature.

withUnlinkButton: bool = False

Show a button to unlink the selected feature without deleting it.

class gws.plugin.model_widget.feature_list.Object

Bases: gws.base.model.widget.Object

Feature list widget object.

props(user)
class gws.plugin.model_widget.feature_list.Props

Bases: gws.base.model.widget.Props

withDeleteButton: bool
withEditButton: bool
withLinkButton: bool
withNewButton: bool
withUnlinkButton: bool