title: JSF Primefaces commandButton
body: <p>I'm trying to create a command button in a page but getting no response from the action method.</p>
  
  <p>PS: new in PrimeFaces</p>
  
  <pre><code>package br.com.copagaz.inova.mobile.web.mb.frota;
  
  import java.io.Serializable;
  
  import javax.faces.bean.ManagedBean;
  import javax.faces.bean.SessionScoped;
  import javax.faces.event.ActionEvent;
  
  @SessionScoped
  @ManagedBean(name = "CadFrota", eager = false)
  public class CadFrota implements Serializable {
  
      private static final long serialVersionUID = -5734393292489385792L;
  
      public void teste(ActionEvent actionEvent){
         System.out.println("teste: " + actionEvent.toString());
      }
  }
  </code></pre>
  
  <hr>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.org/ui"&gt;
  
      &lt;h:body&gt;
          &lt;ui:composition template="/pages/templates/master.xhtml"&gt;
              &lt;ui:define name="divMain"&gt;
  
                  &lt;h:form id="frotaForm"&gt;
  
                      &lt;p:growl showDetail="false" life="3000" /&gt;
  
  
                      &lt;p:panel id="toggleable1" header="Frota" toggleable="false" closable="false" widgetVar="frotaPanel"
                               style="margin-bottom:20px"&gt;
  
                          &lt;p:panelGrid style="width:90%"&gt;
  
                              &lt;p:row&gt;
                                  &lt;p:column&gt;
                                      &lt;p:outputLabel&gt;Filial:&lt;/p:outputLabel&gt;
                                  &lt;/p:column&gt;
                                  &lt;p:column&gt;
                                      &lt;p:inputText id="i10" value="" /&gt;
                                  &lt;/p:column&gt;
                                  &lt;p:column&gt;
                                      &lt;p:outputLabel&gt;Veículo:&lt;/p:outputLabel&gt;
                                  &lt;/p:column&gt;
                                  &lt;p:column&gt;
                                      &lt;p:inputText id="i11" value="" /&gt;
                                  &lt;/p:column&gt;
                                  &lt;p:column&gt;
                                      &lt;p:outputLabel&gt;Placa:&lt;/p:outputLabel&gt;
                                  &lt;/p:column&gt;
                                  &lt;p:column colspan="3"&gt;
                                      &lt;p:inputText id="i12" value="" /&gt;
                                  &lt;/p:column&gt;
                                  &lt;p:column&gt;
                                      &lt;p:outputLabel&gt;Senha:&lt;/p:outputLabel&gt;
                                  &lt;/p:column&gt;
                                  &lt;p:column colspan="3"&gt;
                                      &lt;p:inputText id="i121" value="" /&gt;
                                  &lt;/p:column&gt;
                              &lt;/p:row&gt;
                              &lt;p:row&gt;
                                  &lt;p:column&gt;
                                      &lt;p:outputLabel&gt;Segmento:&lt;/p:outputLabel&gt;
                                  &lt;/p:column&gt;
                                  &lt;p:column&gt;
                                      &lt;p:selectOneMenu id="console" value="XXXXX" style="width:125px"&gt;
                                          &lt;f:selectItem itemLabel="Select One" itemValue="" /&gt;
                                          &lt;f:selectItem itemLabel="AAA" itemValue="AAA" /&gt;
                                          &lt;f:selectItem itemLabel="BBB" itemValue="BBB" /&gt;
                                          &lt;f:selectItem itemLabel="CCC" itemValue="CCC" /&gt;
                                      &lt;/p:selectOneMenu&gt;
                                  &lt;/p:column&gt;
                                  &lt;p:column &gt;
                                      &lt;h:panelGrid columns="2"&gt;
                                          &lt;h:outputText value="Massico: " /&gt;
                                          &lt;p:selectBooleanCheckbox value="" /&gt;
                                      &lt;/h:panelGrid&gt;
                                  &lt;/p:column&gt;
                                  &lt;p:column &gt;
                                      &lt;h:panelGrid columns="2"&gt;
                                          &lt;h:outputText value="Ativo: " /&gt;
                                          &lt;p:selectBooleanCheckbox value="" /&gt;
                                      &lt;/h:panelGrid&gt;
                                  &lt;/p:column&gt;
                                  &lt;p:column colspan="2"&gt;
                                  &lt;/p:column&gt;
  
                              &lt;/p:row&gt;
                          &lt;/p:panelGrid&gt;
                      &lt;/p:panel&gt;
  
                      &lt;p:separator style="width:90%;height:5px;border: none;" /&gt;
  
                      &lt;p:panelGrid columns="2" styleClass="panelgridCmdBtn"&gt;
                          &lt;p:commandButton id="gravaFrota" value="Gravar" action="#{CadFrota.teste}" icon="ui-icon-bullet"/&gt;
                          &lt;p:commandButton id="gravarCheckFilial" value="Gravar Check Filial" actionListener="#{Viagem.gravarCheckFilial}" ajax="false" style="margin-left:1px" /&gt;
                          &lt;p:commandButton value="Voltar"  immediate="true" style="margin-left:3px" /&gt;
                      &lt;/p:panelGrid&gt;
  
                  &lt;/h:form&gt;
  
              &lt;/ui:define&gt;
          &lt;/ui:composition&gt;
      &lt;/h:body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>Error stack:</strong></p>
  
  <blockquote>
    <p>Caused by: javax.el.PropertyNotWritableException: /pages/controle/cadastro_frota.xhtml @25,42 value="": Illegal Syntax for Set Operation<br>
    Caused by: javax.el.PropertyNotWritableException: Illegal Syntax for Set Operation</p>
  </blockquote>