Page 1 of 1

How to add dynamic drop down at the administration page

Posted: Sun Mar 24, 2013 6:52 am
by Jerry
Hi guys,
I know how to add a drop which items values are fixed, But, I want to make the drop down item value be configurable.
I want to retrieve the data from the DB. Does broadleaf support this?
Thanks.


Regards,
Jerry

Re: How to add dynamic drop down at the administration page

Posted: Fri Apr 12, 2013 3:30 pm
by jefffischer
Use the AdminPresentationDataDrivenEnumeration annotation (in tandem with AdminPresentation) for your field. You will need to populate the data in the database for your dropdown values yourself. Look at DataDrivenEnumerationImpl for the domain and database table.