Issue Bug Resolved

#79571Form.Select do not work with ObjectStorage if the multiple attribute is false

Sebastian Rieger 01/31/17, 13:58 updated 10/22/26, 20:20

Description

I have a model class with a attribute like “selectedCompany” which is a objectstorage.

If i write a for with a select like:
<f:form multiple="multiple" property="selectedCompany" options="{companies}" sortbyoptionlabel="true" prependoptionlabel="-- Bitte auswählen --" optionlabelfield="name" additionalattributes="{required: 'true'}"></f:form>

all works fine. I can select a single company or more. But some useres should only can select a single one like:
<f:form property="selectedCompany" options="{companies}" sortbyoptionlabel="true" prependoptionlabel="-- Bitte auswählen --" optionlabelfield="name" additionalattributes="{required: 'true'}"></f:form>

the selected company is not saved because the rendered select tag is not a array!

Reviews 2

History 25

  1. Benjamin Kott commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-10-22T20:20:14+00:00" > 10/22/26, 20:20 </span>

    Applied in changeset commit:3551971bb59e1967681dfd6141f51d18c1e6973d.