Passing a JSF2 managed pojo bean into EJB or putting what is required into a transfer object

后端 未结 2 1558
花落未央
花落未央 2020-12-04 03:35

Currently i am calling EJB 3 Session Beans from JSF 2. However, i am not sure if i should be passing JSF managed beans into EJB?

Assuming t

2条回答
  •  执念已碎
    2020-12-04 04:23

    I was trying to do the same with CDI and the main diffrence (excluding using @Named instead of @ManagedBean) was that I had to initialize my transport object in the Controller class.

    So instead of:

    private Product product;

    I had to use:

    private Product product = new Product();

    Maybe it will help someone :)

提交回复
热议问题