Skip to content

Instantly share code, notes, and snippets.

@esaounkine
Created April 29, 2011 07:58
Show Gist options
  • Save esaounkine/948009 to your computer and use it in GitHub Desktop.
Save esaounkine/948009 to your computer and use it in GitHub Desktop.
Clear an iterator in ADF 10g - backing bean
javax.faces.context.FacesContext ctx = javax.faces.context.FacesContext.getCurrentInstance();
javax.faces.el.ValueBinding bind = ctx.getApplication().createValueBinding("#{data}");
oracle.adf.model.BindingContext bindingContext = (oracle.adf.model.BindingContext) bind.getValue(ctx); //resolve binding context
oracle.adf.model.binding.DCDataControl dataControl = bindingContext.findDataControl("AppModuleDataControl");//find data control by name (defined in DataBindings.cpx) from BindingContext
/*
* finally get the View Object instance which the iterator is bound to (see the attribute Binds in the iterator definition in the pageDef)
* then invoke the magic method executeEmptyRowSet on it
*/
((AppModuleImpl) dataControl.getDataProvider()).getCity1().executeEmptyRowSet();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment