Page 1 of 1

Element collection vs SelectItem

Posted: Fri Feb 15, 2013 3:59 am
by julia
Hello,

I would like to extend the CustomerImpl. And I add the field named businessType into it. This field is Collection String type. I use element collection on this field.

In my customer module ui, I want to show this field like a SelectItem in the dynamic form view. There are two or three business types (such as Retail shop, Hotel & Resort and Other) in SelectItem to choose. I want to choose one or more from SelectItem.

I don't want to extends CustomerPresenter and CustomerView. I want to change only in the Customer entity.

Is that possible? I have no idea how to do it. I would like to hear the idea for that.

I hope any idea.

Thanks

Re: Element collection vs SelectItem

Posted: Mon Feb 18, 2013 6:04 pm
by phillipuniverse
We currently do not support the exact UI considerations that you are referring to; specifically the multi-select item. You could do a single-select item with @DataDrivenEnumeration. The only list types that we support out of the box on an entity is relating to a list of other entities (not an element collection of primitives).

Re: Element collection vs SelectItem

Posted: Mon Feb 18, 2013 9:04 pm
by julia
Thank u for reply,

Is there example for using @DataDrivenEnumeration in broadleaf demo?

julia.