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

2006-11-09 Thread ccanning
I am new to seam, but I will try to answer the question. It appears that the 
ICheckoutAction is currently null. If it is allowed to be null, you should use 
(required=false). If you want Seam to create it, try (create=true). I think the 
exception prepends the name so you know which component is having the issue.

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3984724
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


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

2006-11-09 Thread chane
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] [EMAIL PROTECTED]
  |key[shop.login] value[LoginAction:3j001-cgob78-euao51bl-1-eublwqzv-54]
  |key[shop.register] 
value[RegisterAction:3j001-cgob78-euao51bl-1-eublwsh5-55]
  |key[processRepository] [EMAIL PROTECTED]
  |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] [EMAIL PROTECTED]
  |key[shop.cart.checkout.paymethod] 
value[PaymethodAction:3j001-cgob78-euao51bl-1-eublzabt-5b]
  |key[billingAddresses] [EMAIL PROTECTED]
  |key[shop.cart.checkout.shipTo] 
value[ShipToAction:3j001-cgob78-euao51bl-1-eubm2ze4-5f]
  |key[redirect] [EMAIL PROTECTED]
  |key[conversation] [EMAIL PROTECTED]
  |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";
  |}
  |
  | 
  | 
  |@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
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


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

2006-11-10 Thread monkeyden
"ccanning" wrote : If you want Seam to create it, try (create=true).

I have been searching for some definition of the requirements for create=true 
to actually work.  Is it simply the presence of a no-arg constructor?  Does it 
have to be a SessionBean (i.e. something with an implicit create method)?

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3984910
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


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

2006-11-10 Thread petemuir
There has to be a no-args constructor on a Seam component (probably annotated 
with @Name, though could be defined in components.xml) OR an @Factory for thhat 
value AFAIK

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3984928
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user