In processRequest or processFormRequest Use this code.....
OADescriptiveFlexBean oaDFF = (OADescriptiveFlexBean)webBean.findIndexedChildRecursive("FlexField"); // put your dff web bean name here
oaDFF.processFlex(pageContext);
// If you want to set the first Dff (first dff shown in the page) to required then
OAMessageChoiceBean FirstDff = (OAMessageChoiceBean)oaDFF.findIndexedChild("FlexField0");
if (FirstDff != null)
{
FirstDff .setRequired("yes"); // Try to access the value here using getText() or getValue() methods..
}
// If you want to set the second DFF (second dff shown on page) then
OAMessageChoiceBean SecDffe = (OAMessageChoiceBean)oaDFF.findIndexedChild("FlexField1");
{
SecDffe .setValue("Default value string"); // Try to access the value here using getText() or getValue() methods..
}
========================================================================
OADescriptiveFlexBean oaDFF = (OADescriptiveFlexBean)webBean.findChildRecursive("FlexDFF"); // put your dff web bean name here
oaDFF.processFlex(pageContext);
Enumeration dffElements= null;
dffElements= oaDFF.getChildNames();
while(dffElements.hasMoreElements())
{
String DffName = (String)dffElements.nextElement();
OAWebBean dffbeans=(OAWebBean)oaDFF.findChildRecursive(DffName );
if(dffbeans != null)
{
dffbeans.setRequired(OAWebBeanConstants.REQUIRED_NO);
}
}
OADescriptiveFlexBean oaDFF = (OADescriptiveFlexBean)webBean.findIndexedChildRecursive("FlexField"); // put your dff web bean name here
oaDFF.processFlex(pageContext);
// If you want to set the first Dff (first dff shown in the page) to required then
OAMessageChoiceBean FirstDff = (OAMessageChoiceBean)oaDFF.findIndexedChild("FlexField0");
if (FirstDff != null)
{
FirstDff .setRequired("yes"); // Try to access the value here using getText() or getValue() methods..
}
// If you want to set the second DFF (second dff shown on page) then
OAMessageChoiceBean SecDffe = (OAMessageChoiceBean)oaDFF.findIndexedChild("FlexField1");
{
SecDffe .setValue("Default value string"); // Try to access the value here using getText() or getValue() methods..
}
========================================================================
OADescriptiveFlexBean oaDFF = (OADescriptiveFlexBean)webBean.findChildRecursive("FlexDFF"); // put your dff web bean name here
oaDFF.processFlex(pageContext);
Enumeration dffElements= null;
dffElements= oaDFF.getChildNames();
while(dffElements.hasMoreElements())
{
String DffName = (String)dffElements.nextElement();
OAWebBean dffbeans=(OAWebBean)oaDFF.findChildRecursive(DffName );
if(dffbeans != null)
{
dffbeans.setRequired(OAWebBeanConstants.REQUIRED_NO);
}
}
Hi Kishore,can you please confirm, is it code working.. it is not working for me. I have changed instead off Message choice to Message test input
ReplyDeletegetting below error oracle.apps.fnd.framework.webui.beans.form.OAFormValueBean cannot be cast to oracle.apps.fnd.framework.webui.beans.message.OAMessageTextInputBean
Please help on this to resolve the issue
DeleteOADescriptiveFlexBean oadescriptiveflexbean = (OADescriptiveFlexBean)webBean.findIndexedChildRecursive("HzAddressStyleFlex");
ReplyDeletepageContext.writeDiagnostics(this,"oadescriptiveflexbean value is : " +oadescriptiveflexbean, 1);
oadescriptiveflexbean.processFlex(pageContext);
OAMessageTextInputBean addressLine = (OAMessageTextInputBean)oadescriptiveflexbean.findIndexedChildRecursive("HzAddressStyleFlex0");
pageContext.writeDiagnostics(this,"addressLine value is : " +addressLine, 1);
if(addressLine!=null){
addressLine.setRequired("yes");
}
OAMessageTextInputBean city = (OAMessageTextInputBean)oadescriptiveflexbean.findIndexedChildRecursive("HzAddressStyleFlex4");
pageContext.writeDiagnostics(this,"City value is : " +city, 1);
if(city!=null){
city.setRequired("yes");
}
I have tried the same but am getting null pointer exception while accessing segment city
ReplyDeleteOADescriptiveFlexBean oaDFF = (OADescriptiveFlexBean)webBean.findIndexedChildRecursive("FlexField"); // put your dff web bean name --> How to determine the dff web bean name ?
ReplyDeleteI have dff enabled on /oracle/apps/imc/ocong/party/organization/webui/ImcOrgProfilePage and DFF Party Information (receivables application). This is context based DFF and I want to get the dff value in my controller. How can i get this ?
ReplyDelete