Friday, October 31, 2014

Alert in OAF in the ProcessFormRequest

we can use this scenario not just for submit buttons but for any "events" that we capture...

    if(pageContext.getParameter("SubmitButton")!=null) /// this condition can be changed to hande //event
    {
      StringBuffer l_buffer = new StringBuffer();
      l_buffer.append("javascript:alert('hello')");
      pageContext.putJavaScriptFunction("SomeName",l_buffer.toString()); // somename can be left //like that
    }


Here SubmitButton is the id name of submitbutton

l_buffer is the variable name of StringBuffer
In my case I have a TextBox where some data is to be input and needs to be validated dynamically, if the validation is not met it has to throw an Alert with some message.

-Sridhar Gajjala

No comments:

Post a Comment