Friday, October 15, 2010

client side validation in BPF

Use EventHandler.js for client side validation.

file is available in the BPF war file and here is the sample code:

Suppose we need to put validation for employee salary

Step 1: make a eventHandler and call oneBeforeAction on that handler

Step 2: eventHandlers.onBeforeAction = function(resName, resId)
{
if(resName=="ABC")
{
if (currentCase != null )
{
var employeeSalary=0;
employeeSalary = parseInt(Salary.value);
if(employeeSalary < 10000)
{
alert("Salary too less !");
return false;
}
}
}
return true;
}

2 comments:

  1. i want to know the eform validation infilenet
    can any body help on this?

    ReplyDelete
  2. client side validation in BPF is explained in simple coding language and can be easily understood by beginner.i am following BPF post.This is new approach and can be used in several applications.Coding format can be more precise.Post server side validation in BPF.I am interested in learning that also.

    ReplyDelete