Bug #5963

Multiple Select Form helper fails when value is Tx_Extbase_Persistence_ObjectStorage

Added by Nathan L about 12 years ago. Updated over 11 years ago.

Won't have this time
Target version:
Start date:
Due date:
% Done:


Estimated time:
Has patch:


<f:form.select multiple="true" size="4" property="dishTypes" options="{allDishTypes}" optionLabelField="name"></f:form.select>

This failed to mark selected items as selected when recipe->getDishTypes() returns a Tx_Extbase_Persistence_ObjectStorage

See the patch for the change I made to make it functional.

Basically the getOptions method converts the values away from objects.

Actually, this change I made should probably be done in getSelectedValue() but I have no time and have to catch my carpool.


multiselect.patch (1.52 KB) multiselect.patch Nathan L, 2010-01-12 00:02

Updated by Nathan L about 12 years ago

Ok, that patch was rushed out the door. Please ignore it.

After double checking things this morning, I found it works if I add:

<f:form.select multiple="true" size="4" property="dishTypes" options="{allDishTypes}" optionLabelField="name" optionValueField="uid"></f:form.select>

This seems ugly to me. I shouldn't have to reference the uid should I?

If a set of objects is passed as "value" to form.select without an optionValueField, it should default to the uid or throw an exception telling the developer to add optionValueField="uid" to the template. If this seems appropriate, then I'd be happy to offer a patch.


Updated by Sebastian Kurfuerst over 11 years ago

  • Status changed from New to Closed
  • Priority changed from Should have to Won't have this time

please try again, I think actually that it automatically uses the UID if it sees instances of AbstractEntity/ValueObject.
And please re-open if needed :)


Also available in: Atom PDF