Illegale Syntax für die Set-Operation

Ich habe ein problem bei der Verbindung Meiner xhtml-Seite auf die managed bean, die Aktion auf die Befehlsschaltfläche funktioniert, aber wenn es um die übergabe von Werten funktioniert es nicht.
hier ist meine jsf-code:

 <h:form id="form" class="form-signin">
            <p:panel id="panel" header=" Authentification" style="" >
                <h:panelGrid columns="2" rowClasses="3">  
                    <h:outputLabel  for="login" value="Nom d'utilisateur :"  styleClass=""/>  
                    <p:inputText id="login" value=" #{authenticationBean.profil.login }" required="true" label="login" >  
                        <f:validateLength minimum="4" />  
                    </p:inputText>  
                    <h:outputLabel for="password" value="Mot de passe :" /> 
                    <p:password id="password" value=" #{authenticationBean.profil.password }" required="true" label="password" styleClass=""/> 

                    <p:row>
                        <p:commandButton id="loginButton" value="Login" ajax="false" action="#{authenticationBean.validate}" />
                        <h:messages id="messages" globalOnly="false"/>
                    </p:row> 
                </h:panelGrid>
            </p:panel> 
        </h:form>

ich bin mit morphia map data, mongo db, ich habe auch ein entitie genannt profil und eine bean zu verwalten authenfication. hier ist mein athentication-bean-Code :

public class AuthenticationBean implements Serializable {
private static final long serialVersionUID = 1L;
private Profil profil;
private ProfilDAO profileDao = DAOFactory.getProfilDAO();

public void validate() {
    FacesMessage message = new FacesMessage("Succès de l'inscription !");
    FacesContext.getCurrentInstance().addMessage(null, message);

}
//getters and setters 

hier ist mein profil entitie-code :

@Entity("profils")
public class Profil {
@Id protected ObjectId _id;
protected String nomProfil,prenomProfil,login,password;
@Embedded protected List<Droit> droits;
@Reference protected Admin admin;
public Profil() {
}
//getters and setters ...

dies ist die eror bekomme ich, wenn ich behaupte, dass einige Daten und klicken Sie auf die Schaltfläche "submit":

javax.el.PropertyNotWritableException: /index.xhtml @29,125 value=" #{authenticationBean.profil.login }": Illegal Syntax for Set Operation
  • Sieht aus wie du ' re fehlt einen setter. Bitte fügen Sie Ihren code für setter, die Frage.
Schreibe einen Kommentar