views:

25

answers:

1

Hello

using spring 3.0 I have page on web flow which has a password input field once the user finishes entering password i need to validate the password if it is right then display email id input field on the same page.

How can i achieve this in flow?

Thanks

A: 

Your example is a page that has a conditionally displayed element. The easiest way to do this, if you are not using ajax, is to create 2 pages (called page1 and page2). Page1 has only the password field. Page2 has both the password field and the email field. After the user submits page1, if the password has been validated, transition to the view-state that displays page2. After the user submits page1, if the password is not valid, transition to the view-state that displays page1.

Dont flame me bro, this is an answer targeted at the percieved level of the questioner's experience (new).

dwb
The issue is the first page does not have any button
Gauls
You do not need a button to submit a form. You can submit it from JavaScript (basically: form.submit()). The 2 page approach, while not elegant, may be sufficient for your needs. My suggestion is: put a login button on the page to submit the form or react to the appropriate event with JavaScript in the password field and submit your form there.
dwb