Create ADF popup for value change event(For select one choice component).

Add popup and add dialog to inside of the popup,then select popup and add value for binding attribute in mine
#{pageFlowScope.popupBean.myPop}.
private RichPopup myPop = new RichPopup();
public void selectOneChoiceEvent(ValueChangeEvent valueChangeEvent) {
RichPopup.PopupHints ph = new RichPopup.PopupHints();
myPop.show(ph);
}
public void setMyPop(RichPopup myPop) {
this.myPop = myPop;
}
public RichPopup getMyPop() {
return myPop;
}

Oracle ADF - Add new custom attribute for view object using Expression

Oracle ADF Client-side Validators

Oracle ADF Association sample for Department and Employee

Thursday, February 16, 2012

ADF - Show faces message for relevant copmonents

Using following method can show error messages for relevant component,

final int MSG_FATAL = 1;
final int MSG_ERROR = 2;
final int MSG_WARN = 3;
final int MSG_INFO = 4;
public void showMsgForRelevantComponentAll(int iSeverity, String sMsg, UIComponent uIComponent) {
FacesMessage msg = null;
switch (iSeverity) {
case MSG_FATAL:
msg = new FacesMessage(FacesMessage.SEVERITY_FATAL, null, sMsg);
break;
case MSG_ERROR:
msg = new FacesMessage(FacesMessage.SEVERITY_ERROR, null, sMsg);
break;
case MSG_WARN:
msg = new FacesMessage(FacesMessage.SEVERITY_WARN, null, sMsg);
break;
case MSG_INFO:
default:
msg = new FacesMessage(FacesMessage.SEVERITY_INFO, null, sMsg);
}
FacesContext facesContext = FacesContext.getCurrentInstance();
facesContext.addMessage(uIComponent.getClientId(facesContext), msg);
}