title: "PropertyNotWritableException: Illegal Syntax for Set Operation" error when setting value in bean
body: <p>I get this error when trying to send some values from jsf page to a bean.</p>
  
  <p>I want to set values to the fields in the bean, then create an Airplane instance and add it to my database. But I get an error telling me that i use illegal syntax for the setter part of the bean. </p>
  
  <p>Why do I get that error? I didnt find anything on this site that helped me with my problem.</p>
  
  <p>Here is the jsf part:</p>
  
  <pre><code>&lt;h4&gt;Add A Plane&lt;/h4&gt;
  
                  &lt;c:if test="#{not empty listAirplaneBB.error}"&gt;
                      &lt;div class="alert alert-danger"&gt;
                          &lt;span class="glyphicon glyphicon-remove"&gt;&lt;/span&gt; &lt;h:outputText value="#{listAirplaneBB.error}" /&gt;
                      &lt;/div&gt;
                  &lt;/c:if&gt;
                  &lt;h:form&gt;
                  &lt;table class="table"&gt;
                      &lt;thead&gt;
                          &lt;tr&gt;
                              &lt;th&gt;Plane Make&lt;/th&gt;
                              &lt;th colspan="1"&gt;Plane Model&lt;/th&gt;
                              &lt;th colspan="1"&gt;Plane Seats&lt;/th&gt;
                          &lt;/tr&gt;
                      &lt;/thead&gt;
                      &lt;tr&gt;    
                          &lt;td&gt;  
                              &lt;h:inputText value="#{addAirplaneCtrl.setMake(make)}"&gt;
                                  &lt;f:validateLength minimum="3" /&gt;
                              &lt;/h:inputText&gt;
                          &lt;/td&gt;
                          &lt;td&gt;
                              &lt;h:inputText id="lastname" value="#{addAirplaneCtrl.setModel(model)}"&gt;
                                  &lt;f:validateLength minimum="3" /&gt;
                              &lt;/h:inputText&gt;
                          &lt;/td&gt;
                          &lt;td&gt;
                              &lt;h:inputText value="#{addAirplaneCtrl.setSeats(seats)}"&gt;
                                  &lt;f:validateLength minimum="1" /&gt;
                              &lt;/h:inputText&gt;
                          &lt;/td&gt;
                          &lt;td&gt;
                              &lt;h:commandButton value="Add Plane" class="btn btn-primary" action="#{addAirplaneCtrl.addPlane()}" /&gt;
                          &lt;/td&gt;
                      &lt;/tr&gt;
                  &lt;/table&gt;
                  &lt;/h:form&gt;
  </code></pre>
  
  <p>Here is the bean:</p>
  
  <pre><code>@Named
  @RequestScoped
  public class AddAirplaneCtrl implements Serializable{
  
  @Inject
  private FlightModel flightModel;
  
  private ListAirplaneBB listAirplaneBB;
  
  private String make; 
  private String model; 
  private String seats;
  
  private static final String PLANE_EXIST = "Plane already exists";
  private static final String EMPTY_FIELDS = "Please fill in all fields";
  
  protected AddAirplaneCtrl(){
      ;
  }
  
  /*
  TO DO LIST
      error handling
  */
  
  public String addPlane(){
  
      //make sure all fields are filled, otherwise set error and return redirect false
      if(make == null || model == null || seats == null){
          listAirplaneBB.setError(EMPTY_FIELDS);
          return "/private/admin/admincenter?faces-redirect=false";
      }
  
      //create planeId
      String pId = make.substring(0, 1);
      pId += model;
  
      //upload photo in new method [Meet requirements, rename photoID planeId, upload to folder]
  
      //check if exist
      List&lt;Airplane&gt; airplaneList = flightModel.getAirplaneList().getByAirplaneId(pId);
      if(!airplaneList.isEmpty()){
          listAirplaneBB.setError(PLANE_EXIST);
          return "/private/admin/admincenter?faces-redirect=false";
      }
  
      //add plane
      Airplane airplane = new Airplane(make, model, pId, seats);
      flightModel.getAirplaneList().create(airplane);
      return "/private/admin/admincenter?faces-redirect=true";
  }
  
  public String deleteAirplane(String planeId){
      return "";
  }
  
  /**
   * @param make the make to set
   */
  public void setMake(String make) {
      this.make = make;
  }
  
  /**
   * @param model the model to set
   */
  public void setModel(String model) {
      this.model = model;
  }
  
  /**
   * @param seats the seats to set
   */
  public void setSeats(String seats) {
      this.seats = seats;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>Here is the error:</p>
  
  <pre><code>javax.faces.component.UpdateModelException: javax.el.PropertyNotWritableException: /private/admin/admincenter.xhtml @118,87 value="#{addAirplaneCtrl.setMake(make)}": Illegal Syntax for Set Operation
  at javax.faces.component.UIInput.updateModel(UIInput.java:866)
  at javax.faces.component.UIInput.processUpdates(UIInput.java:749)
  at javax.faces.component.UIForm.processUpdates(UIForm.java:281)
  at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1286)
  at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1286)
  at javax.faces.component.UIViewRoot.processUpdates(UIViewRoot.java:1254)
  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:198)
  at javax.faces.webapp.FacesServlet.service(FacesServlet.java:646)
  at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:344)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
  at edu.cth.dzenkyair.frontend.auth.AdminFilter.doFilter(AdminFilter.java:40)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
  at edu.cth.dzenkyair.frontend.auth.UserFilter.doFilter(UserFilter.java:39)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:316)
  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
  at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
  at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
  at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
  at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:415)
  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:282)
  at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
  at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
  at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201)
  at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175)
  at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
  at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
  at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
  at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
  at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
  at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
  at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
  at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561)
  at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
  at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
  at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
  at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
  at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
  at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
  at java.lang.Thread.run(Thread.java:745)
  Caused by: javax.el.PropertyNotWritableException: /private/admin/admincenter.xhtml @118,87 value="#{addAirplaneCtrl.setMake(make)}": Illegal Syntax for Set Operation
  at com.sun.faces.facelets.el.TagValueExpression.setValue(TagValueExpression.java:136)
  at javax.faces.component.UIInput.updateModel(UIInput.java:832)
  ... 45 more
  Caused by: javax.el.PropertyNotWritableException: Illegal Syntax for Set Operation
  at com.sun.el.parser.AstValue.setValue(AstValue.java:228)
  at com.sun.el.ValueExpressionImpl.setValue(ValueExpressionImpl.java:294)
  at org.jboss.weld.el.WeldValueExpression.setValue(WeldValueExpression.java:64)
  at com.sun.faces.facelets.el.TagValueExpression.setValue(TagValueExpression.java:131)
  ... 46 more
  </code></pre>