3 Replies Latest reply on May 7, 2009 9:31 PM by Nidhi Batra

    jpdl pageflow and bijection

    Rick Kilcoyne Newbie
      I have a pageflow backed by a SFSB. In my SFSB I have a field defined as:

      @In(required=false) @Out
      String txtName

      I bound this value to the appropriate form in page flow with:

      <h:inputText value=#{txtName} />

      This field is initialized from my SFSB @Begin method with:

      this.txtName = "Rick"

      When the pageflow is run, the initial value displays properly in its form field, however after modifying the value, moving to the next step in the pageflow, then returning to the previous step, the value I entered is lost.

      My question is: are values injected on jpdl transitions or are they still limited to method calls on their Seam component?
        • 1. Re: jpdl pageflow and bijection
          Rick Kilcoyne Newbie
          BTW, exposing my SFSB field using a getter/setter and binding it to the text field with #{myBean.txtName} achieves the desired result. It just seems like the easier, less verbose method is to use bijection.
          • 2. Re: jpdl pageflow and bijection
            Rick Kilcoyne Newbie
            I think I got this figured out...

            Bijection occurs with method calls in a component. In my pageflow, I use commandButtons to call the "next" transition. Since this "next" transition has nothing to do with the SFSB backing my pageflow, it doesn't trigger a method call, therefore bijection doesn't take place and the fields from my SFSB are not bijected.

            The solution is to create a method called next() in my SFSB that returns the string "next" and gets called from my command button: <h:commandButton value="Next" action="#{MyBean.next}"/>. Since this triggers a method in my SFSB, the fields are bijected.

            • 3. Re: jpdl pageflow and bijection
              Nidhi Batra Newbie

              I have a kind of related question; does the jpdl pageflow have to be backed by a stateful session bean or can the seam beans even be stateless beans or POJOs or anything else?