This content has been marked as final. Show 3 replies
Moazzam wrote:I'm assuming you mean it's not initialized with new anywhere. If the cart variable were not defined anywhere, you'd get a compile time error.
In BookstoreBean.java, the cart object is not defined anywhere.
Is it due to context and dependency injection?See where the cart variable is defined.
So now we're going to get a hundred posts by you with this form? You can't learn JSF by staring at example code, you need to read a proper book to learn not only the how but more importantly the WHY. Not knowing or understanding something is not a problem for a forum; you solve it by reading, studying, researching, experimenting.
Thanks Kayaman. I am able to find it. It is defined in the parent class as below:
You can't learn JSF by staring at example code
@Inject ShoppingCart cart;
Why are you assuming that I have started from the example code. For your information, I have gone through the complete documentation and now I have reached the last chapters of case study.