title: javax.el.PropertyNotWritableException: /index.xhtml @29,118 value="": Illegal Syntax for Set Operation
body: <p>I want to create a login screen with localization option to translate the name and when i change from the default English to Arabic it crash</p>
  
  <p>here is the faces.config.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;faces-config
      xmlns="http://java.sun.com/xml/ns/javaee"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
      http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
      version="2.0"&gt;
       &lt;application&gt;
             &lt;locale-config&gt;
                  &lt;default-locale&gt;en&lt;/default-locale&gt;
                  &lt;supported-locale&gt;ar&lt;/supported-locale&gt;
             &lt;/locale-config&gt;
         &lt;resource-bundle&gt;
          &lt;base-name&gt;mypack.enar&lt;/base-name&gt;
          &lt;var&gt;msg&lt;/var&gt;
         &lt;/resource-bundle&gt;
       &lt;/application&gt;
  &lt;/faces-config&gt;
  </code></pre>
  
  <p>ManagedBean</p>
  
  <pre><code>import java.io.Serializable;
  import java.util.LinkedHashMap;
  import java.util.Locale;
  import java.util.Map;
  import javax.faces.bean.ManagedBean;
  import javax.faces.bean.RequestScoped;
  import javax.faces.context.FacesContext;
  import javax.faces.event.ValueChangeEvent;
  
  /**
   *
   * @author body
   */
  @ManagedBean(name = "localize")
  @RequestScoped
  public class LocalizeMBean implements Serializable {
  
      /**
       * @return the countries
       */
      public static Map&lt;String, Object&gt; getCountries() {
          return countries;
      }
  
      /**
       * @param aCountries the countries to set
       */
      public static void setCountries(Map&lt;String, Object&gt; aCountries) {
          countries = aCountries;
      }
  
      private String localeCode;
  
      /**
       * Creates a new instance of LocalizeMBean
       */
      public void setLocaleCode(String localeCode) {
          this.localeCode = localeCode;
      }
  
      public Map&lt;String, Object&gt; getCountriesInMap() {
          return getCountries();
      }
  
      public String getLocaleCode() {
          return localeCode;
      }
      private static Map&lt;String, Object&gt; countries;
  
      static {
          setCountries(new LinkedHashMap&lt;String, Object&gt;());
          getCountries().put("English", Locale.ENGLISH); //label, value
          getCountries().put("Arabic", Locale.UNICODE_LOCALE_EXTENSION);
      }
  
      public void countryLocaleCodeChanged(ValueChangeEvent e) {
  
          String newLocaleValue = e.getNewValue().toString();
  
          //loop country map to compare the locale code
          for (Map.Entry&lt;String, Object&gt; entry : getCountries().entrySet()) {
  
              if (entry.getValue().toString().equals(newLocaleValue)) {
  
                  FacesContext.getCurrentInstance()
                          .getViewRoot().setLocale((Locale) entry.getValue());
  
              }
          }
      }
  }
  </code></pre>
  
  <p>JSF page</p>
  
  <pre><code>&lt;h:head&gt;
          &lt;title&gt;My Login Page&lt;/title&gt;
          &lt;h:outputStylesheet library="mycss" name="login-box.css"/&gt;
      &lt;/h:head&gt;
      &lt;h:body&gt;
          &lt;h:form&gt;
              &lt;div style="padding: 100px 0 0 250px;"&gt;
  
  
                  &lt;div id="login-box"&gt;
  
                      &lt;H2&gt;Login&lt;/H2&gt;
                      My Login Screen
                      &lt;br /&gt;
                      &lt;h:selectOneMenu value="#{localize.localeCode}" onchange="submit();"
                                       valueChangeListener="#{localize.countryLocaleCodeChanged}"&gt;
                          &lt;f:selectItems value="#{localize.countriesInMap}" /&gt; 
                      &lt;/h:selectOneMenu&gt;
                      &lt;br /&gt;
                      &lt;div id="login-box-name" style="margin-top:20px;"&gt;
                          &lt;h:outputLabel value="#{msg.namee}" /&gt;
                      &lt;/div&gt;
                      &lt;div id="login-box-field" style="margin-top:20px;"&gt;
                          &lt;h:inputText  styleClass="form-login" title="Username" value="" size="30" maxlength="2048" /&gt;
                      &lt;/div&gt;
                      &lt;div id="login-box-name"&gt;Password:&lt;/div&gt;&lt;div id="login-box-field"&gt;&lt;h:inputSecret styleClass="form-login" title="Password" value="" size="30" maxlength="2048" /&gt;&lt;/div&gt;
                      &lt;br /&gt;
                      &lt;div class="login-box-options"&gt;&lt;h:selectBooleanCheckbox value="1"/&gt;Remember me&lt;h:commandLink style="margin-left:30px;" value="Forget Password"/&gt;&lt;/div&gt;
                      &lt;br /&gt;
                      &lt;br /&gt;
                      &lt;h:commandButton styleClass="button"/&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/h:form&gt;
      &lt;/h:body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>The Exception when i change in the combobox</p>
  
  <pre><code>javax.faces.component.UpdateModelException: javax.el.PropertyNotWritableException: /index.xhtml @29,118 value="": Illegal Syntax for Set Operation
      at javax.faces.component.UIInput.updateModel(UIInput.java:853)
      at javax.faces.component.UIInput.processUpdates(UIInput.java:735)
      at javax.faces.component.UIForm.processUpdates(UIForm.java:281)
      at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1242)
      at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1242)
      at javax.faces.component.UIViewRoot.processUpdates(UIViewRoot.java:1231)
      at com.sun.faces.lifecycle.UpdateModelValuesPhase.execute(UpdateModelValuesPhase.java:78)
      at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
      at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1550)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
      at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
      at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
      at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
      at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
      at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
      at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
      at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
      at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
      at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
      at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
      at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
      at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
      at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
      at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
      at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
      at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
      at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
      at java.lang.Thread.run(Thread.java:722)
  Caused by: javax.el.PropertyNotWritableException: /index.xhtml @29,118 value="": Illegal Syntax for Set Operation
      at com.sun.faces.facelets.el.TagValueExpression.setValue(TagValueExpression.java:136)
      at javax.faces.component.UIInput.updateModel(UIInput.java:818)
      ... 38 more
  </code></pre>