When I push the "add player" button all my ÅÄÖ characters changes to different characters the first time but not after that. Feels like a have tried all things to get it work. It should add a player to an ArrayList
. Any tip is welcome.
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core">
<h:head><meta http-equiv='Content-Type' content='text/html' charset='UTF-8' />
<title>Add Player</title>
<h:outputStylesheet library="css" name="style.css" />
</h:head>
<h:body>
<center>
<h:form>
<h:panelGrid columns="2">
<h:outputLabel value="Id:"/>
<h:inputText name="id" value="#{id}" required="true"/>
<h:outputLabel value="Name:"/>
<h:inputText name="name" value="#{name}" required="true"/>
<h:outputLabel value="Age:"/>
<h:inputText value="#{age}" required="true"/>
<h:outputLabel value="Address:"/>
<h:inputText value="#{address}" required="true"/>
<h:outputLabel value="Email:"/>
<h:inputText value="#{email}" required="true"/>
<br />
<h:commandButton value="Add Player" type="Submit"
action="#{allPlayers.addPlayer(id,name,age,address,email)}"/>
</h:panelGrid>
</h:form>
<h:form><h:commandButton value="Show All players" action="listPlayer.xhtml" /></h:form>
</center>
</h:body>
</html>