Wednesday 15 August 2018

Clear fields in oaf

Clear fields in oaf

In this post , We will discuss about clear fields in OAF. We often have an Requirment to clear all the fields of the OAF page after clicking the Clear Button. This will reset the fields in the OAF page. Here below I am sharing the example of the Clear Fields in oaf. I am writing the sample code to clear the fields of the OAF page.
 
 

Sample code of Clear fields in oaf

 
      if(pageContext.getParameter("Clear")!=null)
      {
        OAMessageTextInputBean  mstb 
         = (OAMessageTextInputBean)webBean.findChildRecursive("item1");
 
        mstb.setValue(pageContext,null);
 
          OAMessageTextInputBean  mstb1 =(OAMessageTextInputBean)webBean.findChildRecursive("item2");
 
          mstb1.setValue(pageContext,null);
         }
 

1 comments:

T RU said...

Hi is there any way to hide clear button in Advance search page autoCustomizationCriteria .
if any sample cod ewil help me..
used below code but it is getting NPE
OAQueryBean queryBean = (OAQueryBean)webBean.findChildRecursive("QueryRN");
String idClear = queryBean.getClearButtonName();
OASubmitButtonBean clear = (OASubmitButtonBean)queryBean.findChildRecursive(idClear);
clear.setRendered(false);

Post a Comment

Contact us for any Collaboration, Project Support & On Job Support Work

Name

Email *

Message *