problem with validation

Hi ,

I have a form with the following components.

txtFld 1

Button1

txtFld 2

Button2

What i need here , is a simple check if text field "txtFld 2 " is empty when button 2 is clicked

To do this , i added {required="true" } for the text field "txtFld 2 " in my jsf .

The validation worked perfectly, when the first thing i do is to click button2 on load of the page .

But the problem comes here..

The sequence must be that, the user enters some value in the txtFld 1

then clicks Button1 . After that he enters some value in txtFld 2

and clicks Button2 to save all values in DB .

When the entry is done in above mentioned sequence , i get a validation error for txtFld 2 , when i click button 1 :-( (which shouldn抰 be happening )

I m a lil new to JSF ...can some one help me out with this problem .

Thanks !

Neel

[918 byte] By [neelotpal_ma] at [2007-11-27 1:25:01]
# 1
Just separate it in two forms if they don't have any relation to each other.
BalusCa at 2007-7-12 0:17:08 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...