Getting Value from KFF in OAF


The below code is used to get the KFF values in runtime(When a user gives input).

OAKeyFlexBean kffbean= (OAKeyFlexBean)webBean.findIndexedChildRecursive(“HrSitKeyFlex”);     //Get the KFF bean

KeyFlexfield kff=(KeyFlexfield)kffbean.getAttributeValue(OAWebBeanConstants.FLEXFIELD_REFERENCE);       //Getting the Reference Value
if(kff!=null){
if(kff.getSegment(1).getValue()!=null){
Segment1 = kff.getSegment(1).getValue().toString();    //This returns Value object so we can just see a object
Segment5 = kff.getSegment(1).getName();                 // This returns the Segment name attached

Segment4 = kff.getSegment(1).getInputValue();       // This returns the Segment value when user gives as input
pageContext.writeDiagnostics(this,”On Getting Value the Entered Value “+Segment4,1);
pageContext.writeDiagnostics(this,”On Getting Value the Computed  Value “+outParamValue,1);

int enter_val = Integer.parseInt(Segment4);
pageContext.writeDiagnostics(this,”On Getting Value the Entered Value “+enter_val,1);
if(outParamValue < enter_val)
{
throw new OAException(“Please Enter a lower value than your Credit Limit”+outParamValue, OAException.ERROR);
}
}
}

Source : The above code was obtained by my collague Vignesh.

About pacesettergraam

A good and realistic person

Posted on February 23, 2015, in Oracle, oracle apps and tagged , , , . Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: