1 Reply Latest reply on Feb 8, 2011 12:55 AM by Syed Mahdi

    dvdstore: where is this order coming from? please help me understand

    Syed Mahdi Apprentice

      hi All!


      I am working with the dvdstore jBPM example...


      in admin/accept.xhtml there is a datatable rendered with  where accept.xhtml is just called with a call to accept.viewtask method that just returns the outcome accept which navigates the user to accept.xhtml defined in pages.xml  :




      <h:dataTable id="OrderLinesDataTable"
                                       value="#{order.orderLines}" 
                                       var="item"
                                       styleClass="dvdtable" 
                                       headerClass="dvdtablehead"
                                       rowClasses="dvdtableodd,dvdtableeven"
                                       columnClasses="dvdtablecol">



      this order object: where is it coming from. I see that AcceptAction.java has an @In Order order; is it coming from here OR in CheckoutAction.java there is :




      @Out(scope=ScopeType.CONVERSATION,required=false)
          Order completedOrder;
      



      is it coming from there??? It is a jBPM process so the one above shouldnt be the order that is displayed in the datatable as its scope is juts conversation, then it must be coming from AcceptAction.java class. BUT its an @In not an @OUT also how does it get filled with the right order in this scenario... and who knows about the right orderid to actually @In the order here. 


      PLSSSSSSS tell me... i cant establish the links between these injected variables i think...


        • 1. Re: dvdstore: where is this order coming from? please help me understand
          Syed Mahdi Apprentice

          its coming from here in components.xml:



          <factory auto-create="true" name="order" scope="stateless"
                    value="#{orderHome.instance}" />
               <framework:entity-home auto-create="true"
                    entity-class="com.jboss.dvd.seam.Order" name="orderHome" scope="conversation">
                    <framework:id>#{orderId}</framework:id>
               </framework:entity-home>



          ok :/ dont make fun of me I am just strating out seam. I actually make classes that extend the EntityHome class and make a factory in there.. Somehow its different from this ( which in theory it should not i guess)