java - jsf 2.0 bean extends another bean Target Unreachable, 'null' returned null -
this question has answer here:
public class superuser extends user implements serializable{ private static final long serialversionuid = 1l; private string username; private string pin; //getters , setters }
when use in managed bean , try access in facelets file this
<h:inputtext id="firstname" value="#{usermanager.superuser.firstname}" required="true" maxlength="30" size="30"/>
i exception
javax.el.propertynotfoundexception: /superuser/create.xhtml @18,96 value="#{usermanager.superuser.firstname}": target unreachable
does mean cannot extend java beans if want access properties?
thanks
it means #{usermanager.superuser}
returned null
, hence setfirstname()
cannot called on it. jsf won't create nested object properties you. have yourself.
to fix this, ensure inside backing bean class behind #{usermanager}
it's not null. e.g.
private superuser superuser = new superuser();
Comments
Post a Comment