how to put validation on inputbox for integer input only

hi! i have a Backing bean with property salary of int type ,on JSF page i want to put a validation on this field , that is if characters are entered in it. form is not submitted and a msg is displayed.Thanks in advance.
[240 byte] By [rahul_yadava] at [2007-10-2 18:54:06]
# 1
many ways to do that.eg make the corresponding bean property int and add a message tag to the inputText.read sth about validation, eg here: corejsf.com
Dill0ra at 2007-7-13 20:31:45 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
thanks for responding.The salary property is int in baean and i have also added message attribute to inputText.the problem is where to put code for checking the datatype and how to call it?plz give me any one answer out of many, also URL provided by u is not correct.
rahul_yadava at 2007-7-13 20:31:45 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
its all done by JSF.if a inputText is connected with a int property validation is done implicit.all you have to do i addd a <h:message for="id of txt field" ...> tagfor me corejsf.com redirects to http://www.horstmann.com/corejsf/
Dill0ra at 2007-7-13 20:31:45 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4
yes i agree it gives msg "{0}": Error during model data update"we can understant this msg but not the end user,also it says nothing abt invalid characters input there.
rahul_yadava at 2007-7-13 20:31:45 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5
plz have a look at corejsf
Dill0ra at 2007-7-13 20:31:45 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...