el - PropertyNotWritableException in JSF 1.2 - setter returning value -


i got troubles attribute binding in jsf 1.2 el 1.0

public class bean {    private string name;    public string getname() {      return name;   }    public bean setname(string name)      this.name = name;      return this;   } 

xhtml give me "property 'name' not writable" error on form submit:

..   <h:inputtext value="#{bean.name}" />  .. 

why? 3rd party lib, there workaround solve case?

change signature of setname method this

public void setname(string name)   this.name = name; } 

if want second constructor in bean class, should designed this

public bean (string name)   this.name = name; } 

Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -