I am facing a strange problem where I am able to get the data from database in editable format in jsf page, but when I click on the update button, the the new data is not passing to the bean. Basically I am trying to edit an already submitted form.
Below are my code:
jsf:
<h:form id="updateTraining">
<p:panelGrid id="update_training" style="width:800px" >
<p:row>
<p:column width="22%" style="align:left;">
Title
</p:column>
<p:column width="78%" style="align:left;" colspan="3">
<p:inputText id="trainingTitle" value="#{trainingModule.trainingTitle}" />
</p:column>
</p:row>
<p:commandButton action="#{trainingModule.forwardTrainingDetails}" value="FORWARD" update="growl">
<f:param name="employeeId" value="#{login.employeeId}" />
</p:commandButton>
</p:panelGrid>
</h:form>
Bean:
@ManagedBean
@SessionScoped
public class TrainingModule {
private String trainingTitle;
//Getters and Setters
public String forwardTrainingDetails() throws Exception
{
System.out.println("Training TITLE:: " +trainingTitle);
}
}
But when I change the value of Training Title, the new value is not updated in the bean. I tried using process="@this,trainingTitle" , but still no luck. Any help is highly appreciated.
Thanks and Regards