package devopsdistilled.operp.client.items.controllers.impl;

import javax.inject.Inject;

import org.springframework.context.ApplicationContext;

import devopsdistilled.operp.client.items.controllers.ProductController;
import devopsdistilled.operp.client.items.models.ProductModel;
import devopsdistilled.operp.client.items.panes.controllers.CreateProductPaneController;
import devopsdistilled.operp.server.data.entity.items.Product;

public class ProductControllerImpl implements ProductController {

	@Inject
	private ApplicationContext context;

	@Inject
	private ProductModel productModel;

	@Override
	public void create() {
		CreateProductPaneController createProductPaneController = context
				.getBean(CreateProductPaneController.class);
		createProductPaneController.init();
	}

	@Override
	public void edit(Product product) {
		// TODO Auto-generated method stub

	}

	@Override
	public void list() {
		// TODO Auto-generated method stub

	}

	@Override
	public void delete(Product product) {
		productModel.deleteAndUpdateModel(product);
	}

}

@@ -88,64 +88,8 @@
 t;%0A%0A
-import org.springframework.context.ApplicationContext;%0A%0A
 impo
@@ -462,234 +462,146 @@
 ate 
-ApplicationContext context;%0A%0A%09@Inject%0A%09private ProductModel productModel;%0A%0A%09@Override%0A%09public void create() %7B%0A%09%09CreateProductPaneController createProductPaneController = context%0A%09%09%09%09.getBean(CreateProductPaneController.class);
+ProductModel productModel;%0A%0A%09@Inject%0A%09private CreateProductPaneController createProductPaneController;%0A%0A%09@Override%0A%09public void create() %7B
 %0A%09%09c

Use @Inject Controller instead of Context