Skip to content

Commit

Permalink
fixed a bug materializing in the converter
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanrauh committed Feb 5, 2018
1 parent 20cc6af commit 56f1d07
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions src/main/java/issue908/CartaportesController.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,14 @@ public class CartaportesController implements Serializable {
private Map<String, Flete> 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");
}


Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/issues/issue908.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<f:selectItems value="#{cartaportesController.fletesMap}"/>
<f:converter converterId="cartaportesFletConv"/>
</b:selectOneMenu>
<h:outputText value="flete elegido: #{cartaportesController.flete==null?'':cartaportesController.flete.name}" />
<h:outputText id="outputId" value="flete elegido: #{cartaportesController.flete==null?'':cartaportesController.flete.name}" />
</b:panelGrid>
</b:form>
</b:column>
Expand Down

0 comments on commit 56f1d07

Please sign in to comment.