Main purpose of Control hints is to centralize certain UI settings across clients. For Example, Label Text control hint is used to give same Field Name/Column Name on all pages where an attribute of a View Object is being displayed. It greatly reduces the amount of UI coding in ADF and thus is frequently used there.
But in OAF it greatly increases the amount of coding needed on UI.
Following screenshot gives an example of where we set control hints:
Following is an example how we get the value of control hints:
OAViewObject vo = (OAViewObject)pageContext.getRootApplicationModule().findViewObject("VOInstanceName");
AttributeDef[] attrDef = vo.getAttributeDefs();
attrdef[i].getName();
// This will give the name of the Attribute; Below image shows the Attribute Name along with other properties.
attrDef[i].getUIHelper().getLabel(pageContext.getRootApplicationModule().getSession().getLocaleContext());
// This will give the value of Lable set in the control hints screen.
When you add control hints, a message bundle file gets created.
No comments:
Post a Comment