Search code examples
jsf-2oracle-adf

How to remove Selectitem from f:selectitems using ADF?


I want to remove Selectitem from f:selectitems using ADF and manage bean when click a button


Solution

  • You can use this code to clear selection

    public BindingContainer getBindings() {
            return BindingContext.getCurrent().getCurrentBindingsEntry();
        }
    
        /**Method to Clear selected value of shuttle (Reset Shuttle)
         * @param actionEvent
         */
        public void resetShuttleAction(ActionEvent actionEvent) {
            BindingContainer bc = this.getBindings();
            JUCtrlListBinding listBindings = (JUCtrlListBinding)bc.get("DepartmentsView1");
            listBindings.clearSelectedIndices();
    
        }
    

    For details check - http://www.awasthiashish.com/2013/12/clear-selected-values-of-shuttle.html