elepy icon indicating copy to clipboard operation
elepy copied to clipboard

Dropdown list

Open rpixelworld opened this issue 6 years ago • 3 comments

@RyanSusana How can we have a dropdown list? Really appreciate

rpixelworld avatar Oct 12 '19 06:10 rpixelworld

Dropdown lists are supported by using enums. Add an @PrettyName to the enum values to give them nice names.

This should also be in documentation. Thanks :D!

RyanSusana avatar Oct 12 '19 13:10 RyanSusana

Thanks for your help. I have another question, how can we have a dropdown list which is a list of another model.

Like this, category is another model maintained in cms, I would like this category as a dropdown list field. Screen Shot 2019-10-24 at 15 14 17

rpixelworld avatar Oct 24 '19 07:10 rpixelworld

@RyanSusana Thanks for your reply

Actually I am looking for a string field which can only has value from a drop down list. Is there a way to do this? If I am using a enum type, it will give trouble when i am using filter. it will throw error like : class java.lang.String cannot be cast to class java.lang.Enum (java.lang.String and java.lang.Enum are in module java.base of loader 'bootstrap

rpixelworld avatar Nov 01 '19 09:11 rpixelworld