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, June 9, 2011

Oracle ADF - How to redirect URL in bean class.

Using following code stuff can easily launch a new page.

import org.apache.myfaces.trinidad.render.ExtendedRenderKitService;
import org.apache.myfaces.trinidad.util.Service;

public void launchNewPage() {
String newPage = "http://www.google.com";
FacesContext ctx = FacesContext.getCurrentInstance();
ExtendedRenderKitService erks =
Service.getService(ctx.getRenderKit(), ExtendedRenderKitService.class);
String url = "window.open('" + newPage + "','_self');";
erks.addScript(FacesContext.getCurrentInstance(), url);
}

No comments:

Post a Comment