I have code:
                <p:inputText id="inputNumber value="#{BookSearcher.form.inputNumber}" onkeypress="if(event.which < 48 || event.which > 57 ) if(event.which != 8) return false;" />
                <p:commandButton value="Submit" actionListener="#{BookSearcher.submit}" update="book"/>
                <h:outputText id="book" value="#{BookSearcher.form.book}" ></h:outputText>
 public void submit(){
   long number;
   number=form.getInputNumber();
   Book book; 
   book = bookService.getBook(number);
   form.setBook(book);
   }
I want to input number in box and output book name from database
Ex: input :12084---> out put :Harry Potter
but it's not working and error:bind => [0]
If I change code in Bean as book = bookService.getBook(12084); it's working.
 
     
    