Hello All
Hope Everyone knows about list of values and autoSuggest beahvior of ADF Framework,
For those who are new to framework can look at this post
ADF Basics : Implementing auto suggest behavior in ADF Faces lov (list of values)
Blog about Oracle ADF, JDeveloper, PL/SQL, Java, JavaScript, jQuery and Other Web Technologies
af|inputComboboxListOfValues::search{ display: none; }
package lookup.view.bean; import java.io.Serializable; import javax.faces.context.FacesContext; import javax.faces.event.ActionEvent; import oracle.adf.model.BindingContext; import oracle.adf.view.rich.component.rich.RichPopup; import oracle.adf.view.rich.event.DialogEvent; import oracle.binding.BindingContainer; import oracle.binding.OperationBinding; import org.apache.myfaces.trinidad.render.ExtendedRenderKitService; import org.apache.myfaces.trinidad.util.Service; public class LookupDataBean implements Serializable { private RichPopup deptPopUpBind; public LookupDataBean() { } public BindingContainer getBindings() { return BindingContext.getCurrent().getCurrentBindingsEntry(); } private void showPopup(RichPopup pop, boolean visible) { try { FacesContext context = FacesContext.getCurrentInstance(); if (context != null && pop != null) { String popupId = pop.getClientId(context); if (popupId != null) { StringBuilder script = new StringBuilder(); script.append("var popup = AdfPage.PAGE.findComponent('").append(popupId).append("'); "); if (visible) { script.append("if (!popup.isPopupVisible()) { ").append("popup.show();}"); } else { script.append("if (popup.isPopupVisible()) { ").append("popup.hide();}"); } ExtendedRenderKitService erks = Service.getService(context.getRenderKit(), ExtendedRenderKitService.class); erks.addScript(context, script.toString()); } } } catch (Exception e) { throw new RuntimeException(e); } } public void createDept(ActionEvent actionEvent) { BindingContainer bindings = getBindings(); OperationBinding ob = bindings.getOperationBinding("CreateInsert"); ob.execute(); showPopup(deptPopUpBind, true); } public void DeptDialogListener(DialogEvent dialogEvent) { FacesContext fct = FacesContext.getCurrentInstance(); if (dialogEvent.getOutcome().name().equals("ok")) { BindingContainer bindings = getBindings(); OperationBinding ob = bindings.getOperationBinding("Commit"); ob.execute(); } } public void setDeptPopUpBind(RichPopup deptPopUpBind) { this.deptPopUpBind = deptPopUpBind; } public RichPopup getDeptPopUpBind() { return deptPopUpBind; } }