jsf - javax.el.MethodNotFoundException: /pages/test.xhtml @12,74 value="#{Beans.IndexClient}" -
how implement function using jsf , need result of function in inputtext. here code bean :
@managedbean(name="beans") @viewscoped @component public class beans { //----------- recupérer le dernier index ---------// public integer indexclient; public integer getindexclient() { return lastindextache; } public void setindexclient(integer indextache) { this.indexclient = indexclient; } @postconstruct public void init() { session session = hibernateutil.getsessionfactory().getcurrentsession(); int index = 0; try { session.begintransaction(); string sql = "select max(t.idclient) client t "; query query = session.createsqlquery(sql); if( query.uniqueresult()==null){ index=0; }else{ index=(int) query.uniqueresult(); index=index+1; } } catch (hibernateexception e) { // todo: handle exception session.gettransaction().rollback(); e.printstacktrace(); } indexclient = index; }
this view code :
<p:inputtext value="#{beans.indexclient}" /> </p:inputtext>
the error:
`javax.el.methodnotfoundexception: /pages/test.xhtml @12,74 value="#{beans.indexclient}": method not found: com.bean.beans@d802ee.indexclient
i made several research on internet have nothing , i'm stuck because of mistake several days, if have idea please me
Comments
Post a Comment