[jboss-user] [JBoss Seam] - Re: Name of @In Parameters

chane do-not-reply at jboss.com
Thu Nov 9 20:00:03 EST 2006


thanks, that would make sense about the name.  My next problem then is how is that component null.  What I didn't show is that this is part of a pageflow and the first step in the pageflow setups the ICheckoutAction which I include below.

I'm pretty sure that an exception was not thrown prior to the one above (I have a custom filter than emails me all exceptions).  In fact, as part of the exception email, I dump the contents of the Seam contexts and found this component (first in list below) in the conversation context just like I expected it to be there:


  | Conversation Context
  |    key[shop.cart.checkout] value[CheckoutAction:3j001-cgob78-euao51bl-1-eublwqzu-53]
  |    key[businessProcess] value[org.jboss.seam.core.BusinessProcess at 1e04a34]
  |    key[shop.login] value[LoginAction:3j001-cgob78-euao51bl-1-eublwqzv-54]
  |    key[shop.register] value[RegisterAction:3j001-cgob78-euao51bl-1-eublwsh5-55]
  |    key[processRepository] value[com.itsolut.core.component.ProcessRepository at 27b78e]
  |    key[em] value[ManagedPersistenceContext(java:/shopEntityManagerFactory)]
  |    key[shop.cart.checkout.verify] value[VerifyCartAction:3j001-cgob78-euao51bl-1-eubm2zea-5g]
  |    key[pageflow] value[Pageflow(default_2)]
  |    key[facesMessages] value[org.jboss.seam.core.FacesMessages at 183d805]
  |    key[shop.cart.checkout.paymethod] value[PaymethodAction:3j001-cgob78-euao51bl-1-eublzabt-5b]
  |    key[billingAddresses] value[org.jboss.seam.jsf.ListDataModel at 108e9aa]
  |    key[shop.cart.checkout.shipTo] value[ShipToAction:3j001-cgob78-euao51bl-1-eubm2ze4-5f]
  |    key[redirect] value[org.jboss.seam.core.Redirect at db5d26]
  |    key[conversation] value[org.jboss.seam.core.Conversation at 1c0726f]
  |    key[shop.cart.checkout.billing.address] value[BillingAddressAction:3j001-cgob78-euao51bl-1-eubm209x-5e]
  |    key[shop.cart.checkout.authorize] value[AuthorizeCartAction:3j001-cgob78-euao51bl-1-eubm3srp-5h]
  | 

So, if the component (first on the in the list), is in the conversation context, why is it not found?

Thanks,
Chris....


  | 
  | @Stateful
  | @Name("shop.cart.checkout")
  | @Scope(ScopeType.CONVERSATION)
  | @LoggedIn
  | @HandleException
  | public class CheckoutAction implements ICheckoutAction {
  | 
  |    @In(create = true)
  |    protected EntityManager em;
  |    
  |    @In(value="shop.login", create=true)
  |    private ILoginAction login;
  |    
  |    private Cart cart;
  |    
  |    @In(value="loggedInUser", scope=ScopeType.SESSION, required=false)
  |    private User user;
  |    
  |    @Begin(pageflow="checkout1")
  |    @SkipLoginCheck
  |    public String start(){
  | 
  |       AppUtils.LOG.fatal("======================================");
  |       AppUtils.LOG.fatal("========= STARTING ===================");
  |       AppUtils.LOG.fatal("======================================");
  |       
  |       AppUtils.LOG.fatal("=== start      ==========");
  |       if(getCart().getCompany().isCheckoutSecure()){
  |          Contexts.getConversationContext().set("shop.checkout.secure.protocol", "TRUE");
  |       }
  |       return login.isLoggedIn() ? "loggedIn" : "loginRequired";
  |    }
  |    
  | <snip code that I think is not relevant />
  | 
  |    @Destroy 
  |    @Remove
  |    public void destroy() {
  |       AppUtils.LOG.fatal("=== destroy CheckoutAction =========");
  |    }
  | }
  | 
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3984747#3984747

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3984747



More information about the jboss-user mailing list