Page 1 of 1

Customizing Admin UI

Posted: Tue Mar 24, 2015 9:22 pm
by mercury1231
I have successfully created a completely customized UI page in Broadleaf Admin UI. However I"m wondering if I could leverage the existing entity (and entity list) template. For example, I'm trying to add these following functions to the UI to suite some particular needs.

1) select multiple entities in the entity list, batch-update (i.e. setting one field on all those entities to the same value) them, or export the selected entities into a CSV file.

2) add range filters, etc. For example, I want to pick (custom) entities with a submit date between two specified dates. And depending on the filtered result, we could do 1) again.

Is this doable simply by extending existing controllers and UI?

Re: Customizing Admin UI

Posted: Mon Mar 30, 2015 11:40 pm
by phillipuniverse
1) select multiple entities in the entity list, batch-update (i.e. setting one field on all those entities to the same value) them, or export the selected entities into a CSV file.


Possibly, it kinda depends on what the UI actually looks like. The concept of a ListGrid is pretty general (see that class) and you can use it to build up a grid DTO and pass it to the frontend.

2) add range filters, etc. For example, I want to pick (custom) entities with a submit date between two specified dates. And depending on the filtered result, we could do 1) again.


This would probably lend itself nicely to building a customized PersistencePackageRequest with some FilterAndSortCriteria.

Actually, maybe you could just extend the existing components/listGrid.html template (see http://www.broadleafcommerce.com/docs/c ... -templates for how to override this) and add a checkbox to the left-hand side. Then you could add some JS and maybe a button or 2 that managed the bulk-editing and CSV export. That way, you could continue to leverage the out of the box filtering of list grids (the little filter icon above each column heading in the grid).