1 Reply Latest reply on Jul 13, 2008 10:14 PM by Canny Duck

    Bijection beginner question

    Canny Duck Newbie
      Hi,

      I'm new at Seam and trying to implement my first process.I want to use use a POJO component as model behind the input fields (without any persistence) and conversation action class working working with jBPM.

      Model:
      `
      @Name("contract")
      public class Contract implements Serializable
      {
        
          private String firstName;

          // getter and setter method for firstName
      }
      `

      Action:
      `
      @Name("createContract")
      @Scope(CONVERSATION)
      public class CreateContractAction implements Serializable
      {
         
          @In(create=true)
          @Out
          private Contract contract;

          @Begin(join=true,pageflow="createContract")
          public void begin(){
              contract.setFirstName("Michael");
          }
      }
      `

      Pageflow:
      `
      <pageflow-definition name="createContract">

          <start-state name="start">
              <transition to="enterContractData"/>
          </start-state>
         
          <page name="enterContractData" view-id="/enterContractData.xhtml">
              <redirect/>
              <transition name="next" to="enterBankData" />
          </page>
         
          <page name="enterBankData" view-id="/enterBankData.xhtml">
              <redirect/>
          </page>
      </pageflow-definition>
      `

      View:
      `
      ...
      <h:message for="firstName" errorClass="errorMessage" />
                  <div class="inputGroup">
                      <div class="inputLabel">${messages.firstName}:</div>
                      <div class="inputElement">
                          <h:inputText id="firstName" value="#{contract.firstName}" />
                      </div>
                  </div>
      ...
      `


      The pageflow is started with a seam link calling the begin method of the CreateContractAction.

      My problem:

      The begin method is called correctly and set the firstName, but after the method is passed the firstName field is null and there is no value shown on the view. Also after a submit of the view the values are not
      set on the contract model.

      You have any ideas?

      Much thanks for your help.

      Best regards

      Canny Duck