title: Unable to execute Backing bean method
body: <p>Command button onclick event is not working its not invoking Banking bean Method. There are some other commandButtons like</p>
  
  <pre><code>action="#{editBean.editQuestionAction}" 
  action="#{editBean.addNewQuestionAction}" 
  </code></pre>
  
  <p>were working fine but its not in the case  of  `action="#{editBean.updateQuestionAction}"</p>
  
  <pre><code>&lt;p:tab title="Questions"&gt;
                  &lt;h:outputText value="Select a project to add questions: " /&gt;
                  &lt;h:selectOneMenu id="projects_dpd" value="#{editBean.currentProject.projectId}" onchange=""&gt;
                      &lt;f:selectItems value="#{projectBean.projects}" /&gt;
                  &lt;/h:selectOneMenu&gt;&lt;br/&gt;
  
                  &lt;h:form id="listForm"&gt;
                      &lt;p:panel id="listPanel" header="List of Questions" toggleable="false" closable="false"&gt;
                          &lt;p:dataList paginatorAlwaysVisible="false" paginatorPosition="bottom" effect="slide"
                                      value="#{editBean.editBeanList}" var="q"
                                      paginator="true" rows="5" effectSpeed="fast"
                                      paginatorTemplate="{PreviousPageLink} {CurrentPageReport} {NextPageLink} {RowsPerPageDropdown}"
                                      rowsPerPageTemplate="5,10,15"&gt;
  
                              &lt;p:column&gt;
                                  &lt;p:commandButton action="#{editBean.**editQuestionAction**}" update="editPanel" title="Edit Question" image="edit"&gt;
                                      &lt;f:setPropertyActionListener value="#{q}" target="#{editBean.editQuestion}" /&gt;
                                  &lt;/p:commandButton&gt;
                                  &lt;p:spacer width="30" height="30" /&gt;
                                  &lt;h:outputText value="#{q.question.questionId} -&gt; #{q.question.questionText} -&gt;"/&gt; &lt;b&gt;&lt;h:outputText value="#{q.question.questionType}" /&gt;&lt;/b&gt;
                              &lt;/p:column&gt;
                          &lt;/p:dataList&gt;
                          &lt;p:commandButton value="New Question !!" action="#{editBean.**addNewQuestionAction**}" update="editPanel" /&gt;
                          &lt;p:commandButton ajax="false" value="Home Page !!" action="#{indexBean.**gotoHomePage}**" /&gt;
                      &lt;/p:panel&gt;
                  &lt;/h:form&gt;
  
                  &lt;p:layoutUnit position="center" scrollable="true"&gt;
                      &lt;p:panel id="editPanel" header="Edit Section" toggleable="false" closable="false" &gt;
                          &lt;h:form id="form"&gt;
                              &lt;table cellspacing="20"&gt;
                                  &lt;tr&gt;
                                      &lt;td&gt;&lt;h:outputLabel value="Question Text:" /&gt;&lt;/td&gt;
                                      &lt;td&gt;&lt;p:inputTextarea id="questionText"  required="true" value="#{editBean.editQuestion.question.questionText}" autoResize="true" effectDuration="400" maxHeight="100" /&gt;&lt;/td&gt;                                &lt;td&gt;&lt;p:message for="questionText" /&gt;&lt;/td&gt;
                                  &lt;/tr&gt;
  
                                  &lt;tr&gt;
                                      &lt;td&gt;Review:&lt;/td&gt;
                                      &lt;td&gt;&lt;p:inputTextarea id="reviewText" required="true" value="#{editBean.editQuestion.question.reviewText}" autoResize="true" effectDuration="400" maxHeight="100" /&gt;&lt;/td&gt;
                                      &lt;td&gt;&lt;p:message for="reviewText" /&gt;&lt;/td&gt;
                                  &lt;/tr&gt;
  
                                  &lt;tr&gt;
                                      &lt;td&gt;Option Type:&lt;/td&gt;
                                      &lt;td&gt;
                                          &lt;h:selectOneRadio label="Option Type" value="#{editBean.editQuestion.question.optionType}"&gt;
                                              &lt;f:selectItem itemLabel="Currency" itemValue="currency" /&gt;
                                              &lt;f:selectItem itemLabel="Hours" itemValue="hours" /&gt;
                                          &lt;/h:selectOneRadio&gt;
                                      &lt;/td&gt;
                                  &lt;/tr&gt;
  
                                  &lt;tr&gt;
                                      &lt;td&gt;Question Type:&lt;/td&gt;
                                      &lt;td&gt;
                                          &lt;h:selectOneRadio label="Question Type" value="#{editBean.editQuestion.question.questionType}"&gt;
                                              &lt;f:selectItem itemLabel="Mandatory" itemValue="mandatory" /&gt;
                                              &lt;f:selectItem itemLabel="Linked" itemValue="linked" /&gt;
                                          &lt;/h:selectOneRadio&gt;
                                      &lt;/td&gt;
                                  &lt;/tr&gt;
  
                                  &lt;tr&gt;
                                      &lt;td align="right"&gt;
                                          &lt;h:selectBooleanCheckbox label="Hide Weight until Review !!" value="#{editBean.editQuestion.question.hideWeight}" /&gt;
                                      &lt;/td&gt;
                                      &lt;td&gt;Hide Weight Until Review&lt;/td&gt;
                                  &lt;/tr&gt;
  
                                  &lt;tr&gt;
                                      &lt;td&gt;Options:&lt;/td&gt;
                                      &lt;td&gt;
                                          &lt;p:panel header="Add Option"&gt;
                                              &lt;h:panelGrid columns="2" id="grid"&gt;
                                                  &lt;h:outputLabel value="Text : " for="txt_title"&gt;&lt;/h:outputLabel&gt;
                                                  &lt;p:inputText id="txt_title"
                                                               value="#{editBean.placeHolderForOption.optionText}" /&gt;
  
                                                  &lt;h:outputLabel value="Weight : " for="txt_author"&gt;&lt;/h:outputLabel&gt;
                                                  &lt;p:inputText id="txt_author"
                                                               value="#{editBean.placeHolderForOption.weight}" /&gt;
  
                                                  &lt;p:commandButton value="Reset" type="reset"/&gt;
                                                  &lt;p:commandButton value="Add" update="options @parent"
                                                                   action="#{editBean.initOption}" &gt;
                                                      &lt;p:collector value="#{editBean.placeHolderForOption}"
                                                                   addTo="#{editBean.editQuestion.options}" /&gt;
                                                  &lt;/p:commandButton&gt;
                                              &lt;/h:panelGrid&gt;
                                          &lt;/p:panel&gt;
  
                                          &lt;p:outputPanel id="options"&gt;
                                              &lt;p:dataTable value="#{editBean.editQuestion.options}" var="opt"&gt;
                                                  &lt;p:column headerText="Text" style="width:150px"&gt;
                                                      &lt;p:cellEditor&gt;
                                                          &lt;f:facet name="output"&gt;
                                                              &lt;h:outputText value="#{opt.optionText}" /&gt;
                                                          &lt;/f:facet&gt;
                                                          &lt;f:facet name="input"&gt;
                                                              &lt;h:inputText value="#{opt.optionText}" /&gt;
                                                          &lt;/f:facet&gt;
                                                      &lt;/p:cellEditor&gt;
                                                  &lt;/p:column&gt;
                                                  &lt;p:column headerText="Weight" style="width:150px"&gt;
                                                      &lt;p:cellEditor&gt;
                                                          &lt;f:facet name="output"&gt;
                                                              &lt;h:outputText value="#{opt.weight}" /&gt;
                                                          &lt;/f:facet&gt;
                                                          &lt;f:facet name="input"&gt;
                                                              &lt;h:inputText value="#{opt.weight}" /&gt;
                                                          &lt;/f:facet&gt;
                                                      &lt;/p:cellEditor&gt;
                                                  &lt;/p:column&gt;
                                                  &lt;p:column headerText="Linked Question" style="width:150px"&gt;
                                                      &lt;p:cellEditor&gt;
                                                          &lt;f:facet name="output"&gt;
                                                              &lt;h:outputText value="#{opt.linkedQuestionId}" /&gt;
                                                          &lt;/f:facet&gt;
                                                          &lt;f:facet name="input"&gt;
                                                              &lt;h:selectOneMenu value="#{opt.linkedQuestionId}"&gt;
                                                                  &lt;f:selectItems value="#{editBean.linkedQuestionIds}" /&gt;
                                                              &lt;/h:selectOneMenu&gt;
                                                          &lt;/f:facet&gt;
                                                      &lt;/p:cellEditor&gt;
                                                  &lt;/p:column&gt;
                                                  &lt;p:column headerText="Display Order" style="width:150px"&gt;
                                                      &lt;p:cellEditor&gt;
                                                          &lt;f:facet name="output"&gt;
                                                              &lt;h:outputText value="#{opt.displayOrder}" /&gt;
                                                          &lt;/f:facet&gt;
                                                          &lt;f:facet name="input"&gt;
                                                              &lt;h:inputText value="#{opt.displayOrder}" /&gt;
                                                          &lt;/f:facet&gt;
                                                      &lt;/p:cellEditor&gt;
                                                  &lt;/p:column&gt;
                                                  &lt;p:column&gt;
                                                      &lt;f:facet name="header"&gt;
                                                          &lt;h:outputText value="Operation" /&gt;
                                                      &lt;/f:facet&gt;
                                                      &lt;p:commandLink value="Remove" update="form:options" process="@this"&gt;
                                                          &lt;p:collector value="#{opt}"
                                                                       removeFrom="#{editBean.editQuestion.options}" /&gt;
                                                      &lt;/p:commandLink&gt;
                                                      &lt;p:spacer width="10" /&gt;
                                                      &lt;p:rowEditor /&gt;
                                                  &lt;/p:column&gt;
                                              &lt;/p:dataTable&gt;
                                          &lt;/p:outputPanel&gt;
                                      &lt;/td&gt;
                                  &lt;/tr&gt;
                              &lt;/table&gt;
                              &lt;p:commandButton ajax="false" value="Update Question" action="#{editBean.updateQuestionAction}"
                                               rendered="#{editBean.operation eq 'edit'}" /&gt;
  
                              &lt;p:commandButton ajax="false" value="Add Question" update="msgs listForm:listPanel" action="#{editBean.saveQuestion}"
                                               rendered="#{editBean.operation eq 'add'}"&gt;
                                  &lt;p:collector value="#{editBean.editQuestion}"
                                               addTo="#{editBean.editBeanList}" /&gt;
                              &lt;/p:commandButton&gt;
  
                              &lt;p:commandButton ajax="false" value="Delete Question" update="msgs listForm:listPanel" action="#{editBean.deleteQuestionAction}"
                                               rendered="#{editBean.operation eq 'edit'}"&gt;
                                  &lt;p:collector value="#{editBean.editQuestion}"
                                               removeFrom="#{editBean.editBeanList}" /&gt;
                              &lt;/p:commandButton&gt;
                          &lt;/h:form&gt;
                      &lt;/p:panel&gt;
                  &lt;/p:layoutUnit&gt;
              &lt;/p:tab&gt;
  </code></pre>
  
  <p>Its not getting executing when i click on button </p>
  
  <pre><code> @ManagedBean
      @RequestScoped
      public class EditBean {
  
          @ManagedProperty(value = "#{questionDao}")
          private QuestionDao questionDao;
          private String operation;
          private QuestionHelper editQuestion;
          private SelectItem[] linkedQuestionIds;
          private List&lt;QuestionHelper&gt; linkedQuestions = new ArrayList&lt;QuestionHelper&gt;();
          private List&lt;QuestionHelper&gt; allQuestions = new ArrayList&lt;QuestionHelper&gt;();
   public void editQuestionAction() {
          operation = "edit";
      }
  
      public void deleteQuestionAction() {
          questionDao.delete(editQuestion.getQuestion());
          listBean.getListOfQuestions().remove(editQuestion);
          addNewQuestionAction();
          FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, "Question: ", "Question Deleted !"));
      }
  
      public void updateQuestionAction() {
          editQuestion.getQuestion().getOptionses().clear();
          for (Options o : editQuestion.getOptions()) {
              o.setQuestions(editQuestion.getQuestion());
              editQuestion.getQuestion().getOptionses().add(o);
          }
          getQuestionDao().update(editQuestion.getQuestion());
          FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, "Question: ", "Question Updated !"));
      }
  </code></pre>