Manorrock.com / Demo JSF

JSF ISBN converter demo

How to get this to work in your own page

This demo requires you to enter an ISBN, if you do not enter an ISBN it will show you an error. If you enter some values for the ISBN it will call the validator to validate the ISBN. The input field here requires you to enter the ISBN, and if you add it with dashes it will silently ignore those. The converter will make sure it gets converted properly.

  <h:inputText required="true" requiredMessage="ISBN is required" value="#{isbnBean.isbn}">
      <f:validator validatorId="com.manorrock.jsf.isbn.ISBNValidator"/>
      <f:converter converterId="com.manorrock.jsf.isbn.ISBNConverter"/>
  </h:inputText>

                        

Actual demo

Enter an ISBN:

Up