0

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

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Biswajit das
  • 99
  • 1
  • 11
  • Could not able to find the solution in the mentioned link @BalusC – Biswajit das Apr 20 '20 at 16:11
  • 1
    Then post a normal [mcve] based on instructions in https://stackoverflow.com/tags/jsf/info. Based on the information provided so far, your problem is not at all reproducible for us. It works just fine for us. The abovementioned link also includes debugging hints. You should tell what exactly happens (not). – BalusC Apr 20 '20 at 16:45

0 Answers0