Search This Blog

Wednesday, April 15, 2009

ADF Page Load event & post back

@PostConstruct

protected void OnLoad(){

if(!isPostback()){

System.out.println("test");

} }

private boolean isPostback() {

return Boolean.TRUE.equals(resolveExpression("#{adfFacesContext.postback}"));

}

private Object resolveExpression(String expression) {

FacesContext ctx = FacesContext.getCurrentInstance(); Application app = ctx.getApplication();

ValueBinding bind = app.createValueBinding(expression); return bind.getValue(ctx);

}

No comments: