Lombok PropertyNotWritableException jsf

804 Views Asked by At

I'm developing one project using jsf and primefaces I was tired of getters and setters and decided to use lombok project to get rid of it. So I've created simple page. there I have:

<p:inputText value ="#{advert.advertId}"/>
<p:commandLink style="color:white" value ="change" update="form"/>

My bean:

@ViewScoped
@ManagedBean(name = "advert")
public class AdvertController
        extends AbstractManagedBean<SessionInfo> implements Serializable {

    @EJB
    private DatabaseManager dbManager;

    @Getter
    private Advert ad;
    @Getter
    @Setter
    private Integer advertId;

}

But when I press my button I get this exeption.

Caused by: javax.el.PropertyNotWritableException: /advert.xhtml @17,60 value=" #{advert.advertId}": Illegal Syntax for Set Operation at com.sun.faces.facelets.el.TagValueExpression.setValue(TagValueExpression.java:136) at javax.faces.component.UIInput.updateModel(UIInput.java:832) ... 41 more

Caused by: javax.el.PropertyNotWritableException: Illegal Syntax for Set Operation at com.sun.el.parser.SimpleNode.setValue(SimpleNode.java:168) at com.sun.el.ValueExpressionImpl.setValue(ValueExpressionImpl.java:294) at org.jboss.weld.el.WeldValueExpression.setValue(WeldValueExpression.java:64) at com.sun.faces.facelets.el.TagValueExpression.setValue(TagValueExpression.java:131) ... 42 more

Any ideas?

0

There are 0 best solutions below