1 Reply Latest reply on May 28, 2007 2:27 PM by Gavin King

    model validation failed:String index out of range: -1

    Clinton Parham Newbie

      Hello,

      I'm trying to bind a Map entry to h:inputText. The code below successfully extracts the value for the key when the page is loaded, but when I submit it, the page reloads with an error alongside the field: model validation failed:String index out of range: -1

      From the .xhtml

      <h:form id="dataEntryForm">
      ...
      <h:inputText id="asdf" required="true" value="#{biomarkers['waist']}" />
      ...
      </h:form>
      


      From the session bean:
      ...
      @Out
      Map<String, String> biomarkers = new HashMap<String, String>();
      ...
      // method code that preps the Map prior to being used
      biomarkers.put("waist", "33.3");
      ...
      


      Thanks to anyone who can offer some assistance!