Quantcast
Channel: Java Programming Forum - Learn Java Programming - Apache POI
Viewing all articles
Browse latest Browse all 120

What the set?

$
0
0
So... now I have another issue to wich I simply can't see a good reason for it to happen...

Code:

SEVERE: Error Rendering View[/users.xhtml]
javax.el.PropertyNotFoundException: /users.xhtml @40,30 value="#{administradorMB.usuarioNovo.Acesso}": The class 'entidades.Guia' does not have the property 'Acesso'.
        at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:104)
        at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:190)
        at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:178)
        at javax.faces.component.UIOutput.getValue(UIOutput.java:168)

Here is the code where the "problem" shows up:
Code:

<h:outputLabel value="Novo nivel de acesso : " />
<h:selectOneMenu value="#{administradorMB.usuarioNovo.acesso}"
                                immediate="true">
                                                                                               
                                <f:selectItem
                                                itemLabel="Administrador"
                                                itemValue="1"/>
                                <f:selectItem
                                                itemLabel="Usuário avançado"
                                                itemValue="2"/>
                                <f:selectItem
                                                itemLabel="Usuário básico"
                                                itemValue="3"/>
</h:selectOneMenu>

Yes, administradorMB has a getter for usuarioNovo and yes, usuarioNovo (it's type is Guia) has a setter for acesso:

Code:

public Guia getUsuarioNovo()
{
        return usuarioNovo;
}

and

Code:

public void setAcesso(int nAcesso)
{
        this.acesso = nAcesso;
}

What I mostly can't understand is that this syntax work for the rest of the code, except in this one sentence: why? :(sweat):

Viewing all articles
Browse latest Browse all 120

Trending Articles