From 56f1d07da481cfa1ffd56533eee50479e00500b9 Mon Sep 17 00:00:00 2001 From: stephan Date: Mon, 5 Feb 2018 21:33:52 +0100 Subject: [PATCH] fixed a bug materializing in the converter --- src/main/java/issue908/CartaportesController.java | 11 +++++------ src/main/webapp/issues/issue908.xhtml | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/main/java/issue908/CartaportesController.java b/src/main/java/issue908/CartaportesController.java index fb21cf5b..a18edfd8 100644 --- a/src/main/java/issue908/CartaportesController.java +++ b/src/main/java/issue908/CartaportesController.java @@ -20,15 +20,14 @@ public class CartaportesController implements Serializable { private Map fletesMap = new HashMap<>(); public CartaportesController() { - populateMap(); + fletesMap.put("- Selecciona -", null); + fletesMap.put("Metal", new Flete(1, "Metal")); + fletesMap.put("Wood", new Flete(2, "Wood")); + fletesMap.put("Plastic", new Flete(3, "Plastic")); } public void populateMap() { - fletesMap.put("- Selecciona -", null); - fletesMap.put("1", new Flete(1, "Metal")); - fletesMap.put("2", new Flete(2, "Wood")); - fletesMap.put("3", new Flete(3, "Plastic")); - flete = fletesMap.get("2"); + flete = fletesMap.get("Wood"); } diff --git a/src/main/webapp/issues/issue908.xhtml b/src/main/webapp/issues/issue908.xhtml index c3e288b1..5a418caa 100644 --- a/src/main/webapp/issues/issue908.xhtml +++ b/src/main/webapp/issues/issue908.xhtml @@ -29,7 +29,7 @@ - +