title: WARNING: /index.xhtml @22,110 target="#{menuTab.action}": Error writing 'action' on type com.menu.MenuTab
body: <p>I have the following JSF view <code>index.xhtml</code>:</p>
  
  <pre><code>&lt;html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:p="http://primefaces.org/ui"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:c="http://java.sun.com/jsp/jstl/core"&gt;
  &lt;ui:composition template="template.xhtml"&gt;
      &lt;ui:define name="top"&gt;
          Menu
      &lt;/ui:define&gt;
      &lt;ui:define name="content"&gt;
          &lt;h:form&gt;
              &lt;p:menubar&gt;
                  &lt;p:submenu label="Admin"&gt;
                      &lt;p:submenu label="User"&gt;
                          &lt;p:menuitem value="Add User" ajax="true"&gt;
                              &lt;f:setPropertyActionListener target="#{menuTab.action}" value="StudentAdd"/&gt; 
                          &lt;/p:menuitem&gt;
                          &lt;p:menuitem value="Edit User" ajax="true"&gt;
                              &lt;f:setPropertyActionListener target="#{menuTab.action}" value="StudentEdit"/&gt; 
                          &lt;/p:menuitem&gt;
                      &lt;/p:submenu&gt;
                  &lt;/p:submenu&gt;
              &lt;/p:menubar&gt;
          &lt;/h:form&gt;
          &lt;p:tabView&gt;
              &lt;c:forEach items="#{menuTab.listOfObjs}" var="item" varStatus="loop"&gt;
                  &lt;p:tab  title="#{menuTab.value}" closable="true"/&gt;
          &lt;/c:forEach&gt;
      &lt;/p:tabView&gt;
      &lt;/ui:define&gt;
  &lt;/ui:composition&gt;
  </code></pre>
  
  <p></p>
  
  <p>And the following managed bean <code>MenuTab.java</code> </p>
  
  <pre><code>package com.menu;
  
  import java.io.Serializable;
  import java.util.ArrayList;
  import java.util.Iterator;
  import java.util.List;
  import javax.faces.bean.ManagedBean;
  import javax.faces.bean.SessionScoped;
  
  
  @ManagedBean(name="menuTab")
  @SessionScoped
  public class MenuTab implements Serializable {
  
  /** Creates a new instance of MenuTest */
  public MenuTab() {
  }
  private String action;
  private String value;
  private List&lt;String&gt; listOfObjs = new ArrayList();
  
  public String getAction() {
      return action;
  }
  
  public void setAction(String action) {
      this.action = action;
      addValue(action);
  }
  //--------------------------------------
  
  public void addValue(String act) {
      if (listOfObjs.isEmpty()) {
          setValue(act);
          getListOfObjs().add(getValue());
          System.out.println("First Data add First Data add First Data add::::::::::::::::" + value);
      }
      Iterator idvalu = listOfObjs.iterator();
      while (idvalu.hasNext()) {
          System.out.println("aaaaaaaaaaa=====" + idvalu.next());
  
          value=act;
  
          if (idvalu.next().equals(value)) {
              System.out.println("Data Alrady Exite Data =====" + value);
          } 
          else {
              setValue(act);
              getListOfObjs().add(getValue());
              System.out.println("bbbbbbbbbbbbbbb=====" + value);
          }
  
      }
  
  }
  
  /**
   * @return the listOfObjs
   */
  public List&lt;String&gt; getListOfObjs() {
      return listOfObjs;
  }
  
  /**
   * @param listOfObjs the listOfObjs to set
   */
  public void setListOfObjs(List&lt;String&gt; listOfObjs) {
      this.listOfObjs = listOfObjs;
  }
  
  /**
   * @return the value
   */
  public String getValue() {
      return value;
  }
  
  /**
   * @param value the value to set
   */
  public void setValue(String value) {
      this.value = value;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>When i click Add User menu;tomcat show this massage: </p>
  
  <pre><code>aaaaaaaaaaa=====StudentAdd
  Jun 24, 2012 3:30:04 PM com.sun.faces.lifecycle.InvokeApplicationPhase execute
  WARNING: /index.xhtml @22,110 target="#{menuTab.action}": Error writing 'action' on type com.menu.MenuTab
  javax.el.ELException: /index.xhtml @22,110 target="#{menuTab.action}": Error writing 'action' on type com.menu.MenuTab
      at com.sun.faces.facelets.el.TagValueExpression.setValue(TagValueExpression.java:139)
      at com.sun.faces.facelets.tag.jsf.core.SetPropertyActionListenerHandler$SetPropertyListener.processAction(SetPropertyActionListenerHandler.java:206)
  </code></pre>