package devopsdistilled.operp.client.items;

import javax.inject.Inject;

import org.springframework.context.ApplicationContext;

import devopsdistilled.operp.client.items.controllers.CreateItemPaneController;
import devopsdistilled.operp.client.items.controllers.ListItemPaneController;
import devopsdistilled.operp.client.items.models.ItemModel;
import devopsdistilled.operp.server.data.entity.items.Item;

public class ItemControllerImpl implements ItemController {

	@Inject
	private ApplicationContext context;

	@Inject
	private ItemModel itemModel;

	@Override
	public void createItem() {
		CreateItemPaneController createItemPaneController = context
				.getBean(CreateItemPaneController.class);
		createItemPaneController.init();
	}

	@Override
	public void listItems() {
		ListItemPaneController listItemPaneController = context
				.getBean(ListItemPaneController.class);
		listItemPaneController.init();
	}

	@Override
	public void editItem(Item item) {

	}

	@Override
	public void deleteItem(Item item) {
		itemModel.deleteAndUpdateModel(item);
	}

}

@@ -195,32 +195,110 @@
 PaneController;%0A
+import devopsdistilled.operp.client.items.controllers.EditItemPaneController;%0A
 import devopsdis
@@ -1037,16 +1037,154 @@
 item) %7B%0A
+%09%09EditItemPaneController editItemPaneController = context%0A%09%09%09%09.getBean(EditItemPaneController.class);%0A%09%09editItemPaneController.init(item);
 %0A%09%7D%0A%0A%09@O

Write definition for editItem(item)