Skip to content

setHidden()

Live Sample · GitHub

The setHidden() method sets the hidden state for the specified DTO fields.

public final void setHidden(DtoField<? super T, ?>... fields)

Parameters:

  • fields – fields the DTO fields

Applies to:

How does it look?

basic_setHidden.gif

Info

Live Sample · GitHub

Field Handling in Table-Type Widgets

Applies to:

1.Dynamic field hiding (setHidden)

For all table-type widgets, dynamic field hiding via setHidden does not affect which columns are shown in the table. setHidden may work inside create/edit forms (if the widget has them), but it cannot change the visible columns of the table itself.

2.Controlling table columns (fields in widget.json)

The set of visible table columns is defined only by the fields array in widget.json. No runtime changes (setHidden, conditions, roles, etc.) can modify the column set.

Behavior by widget type : GroupingHierarchy widget, List widget

In create / edit mode ( / ), the fields array affects only the create/edit form.

It does not affect which columns are shown in the list.

Behavior by widget type AdditionalList widget

In read mode (), the fields array does not affect either the table or the view form. The behavior is fixed and defined by the widget's implementation.

Example for all type widgets: Live Sample · GitHub

How to add?

Live Sample · GitHub

Example

buildRowDependentMeta


Live Sample · GitHub