Dears,

I have something like this in a Seam component of mines:


  | @Name("myComp")
  | @Scope(ScopeType.EVENT)
  | @Intercept(InterceptionType.ALWAYS)
  | public class MyComp {
  |     @In(create = true)
  |     private HibernateEntityManager theDatabase;
  | 
  | 
  |     @RequestParameter
  |     private String p;
  | 
  |     @In(create = true) @Out
  |     private Integer idCat;
  | 
  |     @Factory("idCat")
  |     public void initIdCat()
  |     { idCat = Integer.valueOf(c); }
  | 
  | 
  |     @In(create = true) @Out
  |     private Cat currentCategory;
  | 
  |     @Factory("currentCategory")
  |     public void initCurrentCategory() {
  |     currentCategory = 
(Cat)theDatabase.getSession().createCriteria(Cat.class)
  |         .add(Restrictions.idEq(idCat))
  |     .uniqueResult();
  |     }
  | 
  | 
  |     // Etc, etc...
  | }
  | 

Now, when I ask for the idCat value from a JSF page, I get a correct result. 
When I attempt from that page to get the value of currentCategory, I get a 
NullPointerException in which it is said that idCat in initCurrentCategory() is 
null.

Is it a Seam issue or a Giampaolo's one?

Regards,

Giampaolo

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

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


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to