0

So basically my problem is that I have an ArrayList of Strings containing words with accents on some of letters. When I get the values of this ArrayList to display as a dropdown menu on the xhtml, I get the values correctly with the accents and everything, however, when I try to submit the string I've selected, I get this error: Validation Error: Value is not valid.

The encoding of the xhtml page is this: <?xml version='1.0' encoding='UTF-8' ?>.

When I select a word that has no accents, everything works as planned.

What am I supposed to do to fix this problem? Thanks.

Edit: As requested, here's the code :

<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <h:outputStylesheet library="css" name="tablestyle.css"  />
        <h:outputStylesheet library="css" name="pagestyle.css"  />
        <h:outputScript library="js" name="common.js" />
        <h:outputScript library="js" name="jquery-ui-1.10.3.custom.js"/>  
        <h:outputScript library="js" name="jquery-ui-1.10.3.custom.min.js"/>  
        <h:outputScript library="js" name="jquery-1.9.1.js" />
    </h:head>
    <h:body> 
        <div id="menu">
            <c:if test="#{SfpExposerBean.dataToRepresent == 'HelpRequest'}" >
                <h:form id="assistancerequest">
                    <p:poll interval="10" update="assistancerequest" /> 
                    <br/><br/>
                    <h:selectOneMenu value="${SfpExposerBean.entrPlat}" style="width: 100px" >
                        &nbsp;&nbsp;&nbsp;
                        <h:outputText value="Plat origem:" />&nbsp;&nbsp;
                        <c:forEach items="${SfpExposerBean.plats}" var="entrplat">
                            <f:selectItem itemValue="${entrplat}" />
                        </c:forEach>
                    </h:selectOneMenu>
                    <h:commandButton value="Ok" action="#{SfpExposerBean.setHelpRequests()}" style="width: 200px" id="submitAssistance" />
                </h:form>
            </c:if>
        </div>
        <div id="collapse" onclick="toggle();" />
   </h:body>
</html>
user2399580
  • 3
  • 1
  • 4

0 Answers0