Hi Madan,

i just commited the ability to add javascript functions for executing on submit
https://issues.apache.org/jira/browse/TOBAGO-311

you can use this for your client-side validation.

Regards,
 Volker

2007/3/11, madan chowdary <[EMAIL PROTECTED]>:

Hi Jorn,

Can u please explain with a simple example .

There are many validations i should be doing in the same form wihout
refreshing my page.

Some of the validations are as such,
1) All the fields are required.
2) Address Validation, which should be done using an Ajax call to NRGSoft,
which is a paid service for address validation.
3) Have to check if the details entered by the user already exists in the
DB, so have to use the renderPartially and get back the result.

So i need to alert the user if any of these fails. and it should be done
through JavaScript Alert.

I tried to place the results which come back with Ajax request in
<tc:hidden/> . but based upon the conditions i need to set the value. As
there's no " rendered " attribute i was not able to use this hidden.

>> You'd have to somehow render that message into your JavaScript when
rendering the view.

Can u also explain me how can i do this ?

Regards,
Madan





----- Original Message ----
From: Jörn Zaefferer <[EMAIL PROTECTED]>
To: MyFaces Discussion <[email protected]>
Sent: Sunday, 11 March, 2007 3:05:05 PM
Subject: Re: [ Tobago ] No Page Refresh while validation

JavaScript based form-validation should always start with the submit event:
When a user presses enter inside one form field, the form is submitted
without triggering your onclick event.

In your case it should be possible to use JSF's built-in localization
features. You'd have to somehow render that message into your JavaScript
when rendering the view.


 ________________________________
 Here's a new way to find what you're looking for - Yahoo! Answers

Reply via email to