# SubpanelHidingActor
The SubpanelHidingActor is used to hide subpanels automatically when they are empty. This can happen after initial loading or later when the subpanel content is updated.
# Parameter
# Parameters in the Layout
Name | Type | Description |
---|---|---|
subpanelIds | array of strings | An array with all layout IDs that should be hidden when their list is empty. |
listActorIds | map of strings | In most cases this parameter can be omitted. It defines the ID of the listActor in its corresponding subpanel. By default, this is the ID of the listActor in the default subpanel global/defaults/layouts/subpanel/default.4aplayout . Currently, the ID is listActor . The key of each entry is the subpanel ID and the value is its listActor ID. |
# Example
In the following example there is a subpanel and a SubpanelHidingActor
. Whenever the subpanel has an empty list, it will be removed from visible content (CSS: display: none
).
<layout>
<!-- other stuff -->
<actors>
<!-- other stuff -->
<actor type="SubpanelHidingActor">
<parameter>
<entry key="subpanelIds" class="array">
<value>mySubpanelId</value>
</entry>
</parameter>
</actor>
</actors>
<elements>
<!-- other stuff -->
<import_layout id="mySubpanelId" layout_id="subpanel" module="myModule">
<parameter>
<entry key="beanActor" class="actor">beanActor</entry>
<entry key="relationName" class="string">myRelation</entry>
</parameter>
</import_layout>
</elements>
</layout>