but i don't know how to pass the id to the method. Is it possible? How to do this?
Thanks for any help.
Joined: Aug 21, 2008
Hi. The int id is an injection point in a producer method, so you need to create a bean / producer that is able to produce values of type int / Integer (these are treated identically). You take the id from somewhere, so once you get it, you could put it to a static (yuck) variable somewhere (directly or calling a method, both suck) to a Bean that also has a producer method that returns this variable. To avoid statics you could also inject the Bean that has the producer method for the int, and call some arbitrary method on it to set the value to the id. It would probably be session / request scoped I suppose. Something along these lines will work.