Page 1 of 1

v2M1 get new product subclass to appear in admin interface

Posted: Sun Aug 05, 2012 4:51 am
by DiscoDancer
I followed the instructions here: http://docs.broadleafcommerce.org/curre ... orial.html to add an entity with more fields. However unlike version 1.6 where having followed similar instructions the admin interface showed my new product type when I clicked 'add' within the 'product' section - v2 doesn't show my new product type, so there is no way for me to create it and populate my new fields. The new table does appear in the db, it just seems to be missing in the admin interface. What are the steps to get a new product to appear in v2 admin interface?

Andrew.

Re: v2M1 get new product subclass to appear in admin interface

Posted: Sun Aug 05, 2012 11:56 am
by DiscoDancer
After reading http://docs.broadleafcommerce.org/curre ... orial.html I realised I needed to add the new entity to the applicationContext-entity.xml within admin as well as site. This meant that I needed to put my new entity classes underneath the core tree rather than the site tree. Then after making core, site, admin and starting site and admin... my new type appeared within admin when creating a new product.

Re: v2M1 get new product subclass to appear in admin interface

Posted: Mon Aug 06, 2012 9:19 am
by phillipuniverse
Yup you've got it. Just to tangent off of this a bit, the projects should be organized like this:

Core - entities, services and daos; really anything that has something to do with Hibernate.
Site - Spring controllers, Thymeleaf Processors
Admin - GWT code, admin-specific services