0
我想注入@ManagedProperty(value =「#{ticketDataBean}」)。我能夠做到這一點,但現在我已經宣佈了一個構造函數,從那以後它失敗了。請指導。 我的代碼片斷無法注入託管屬性與構造函數
@ManagedProperty(value = "#{ticketDataBean}")
private TicketDataBean ticketDataBean;
public class TicketDataBean extends CreateTicketData implements Serializable {
private static final long serialVersionUID = 1L;
private String category;
private TicketingService service;
private static final transient Logger LOGGER = LoggerFactory.getLogger(TicketDataBean.class);
public TicketDataBean(final TicketingService service) {
final net.atos.portlet.ticketing.model.UserInfo originalUser;
this.service = service;
originalUser = service.getDefaultReceiver();
receiverId = originalUser != null ? originalUser.getId() : null;
LOGGER.info("Reciever id in ticketdatabean---->" + receiverId);
}
什麼是TicketingService?它是一個'EJB'還是另一個'ManagedBean'? –