vendredi 29 mai 2015

JSF Property not found exception

can someone help out, I just don't get it, the other bean works fine, i'ts just that bean that sucks:

BEAN:

import java.io.Serializable;
import java.util.List;
import javax.enterprise.context.SessionScoped;
import javax.inject.Named;

@SessionScoped
@Named
class FeedbackController implements Serializable {

    private static final long serialVersionUID = 1L;

    private Lecture lecture;
    private List<Feedback> filteredFeedbacks;

    public Lecture getLecture() {
        return lecture;
    }

    public void setLecture(Lecture lecture) {
        this.lecture = lecture;
    }

VIEW:

<p:dataTable var="feedback" 
             value="#{feedbackController.lecture.feedbacks}" 

ERROR: javax.el.PropertyNotFoundException: The class 'com.xxx.controller.FeedbackController' does not have a readable property 'lecture'.

Since I'm quite nooby to the subject, i dont even know what i'm possibly doing wrong. I dont get, why he is not able to access 'lecture' when the Controller is @Named and has a public getLecture() method. Also to say, is that i've got another view with the same priciple and it works fine, so i suppose to know what i'm doing.

Thanks in advance!

Aucun commentaire:

Enregistrer un commentaire