4 Replies Latest reply: Mar 1, 2013 2:36 AM by Tshifhiwa RSS

    deleting wrong values

    Tshifhiwa
      hi when i click mt delete button it delete wrong information or values,it does not delete the value from the table it goes and delete value from my forms i drag and drop the correct delete button,am in jdeveloper 11.1.1.6.0
      my button is
      <af:commandButton actionListener="#{bindings.Delete1.execute}"
                                              text="Remove Member"
                                              id="cb8" immediate="true"/>
        • 1. Re: deleting wrong values
          Sashank Pappu
          Hi ,

          Can you please send the deleted Wrong values and where you mentioned them . Can you elobrate the issue little more by saying what actually is your requirement and what approach you followed for it .

          Thank you,
          Shashank P
          • 2. Re: deleting wrong values
            Tshifhiwa
            hi i drag and drop my delete values from my data control under operations,is there another way i can do delete like manual delete because i what to delete value in my database and pass those values in my OID and delete tham there
            • 3. Re: deleting wrong values
              Sashank Pappu
              Hi ,

              Is this what you are looking for ? As we can even use managed bean to execute the operations.

              http://www.youtube.com/watch?v=ikaL_uDELb0

              Thank you,
              Shashank P.
              • 4. Re: deleting wrong values
                Tshifhiwa
                hi this is what i have done
                <af:commandButton actionListener="#{bindings.Delete1.execute}"
                                                        text="Delete"
                                                        id="cb10">
                                        <af:setActionListener from="#{true}"
                                                              to="#{pageFlowScope.addMember.deleteAction}"/>
                                      </af:commandButton>
                
                
                    private boolean deleteAction = false;
                    private boolean EditAction = false;
                    private boolean createAction = false;
                    private ViewRowImpl selectedJobs;
                
                    public void setDeleteAction(boolean deleteAction) {
                        this.deleteAction = deleteAction;
                    }
                
                    public boolean isDeleteAction() {
                        OIDOperations   oIDOperations= new  OIDOperations();
                        Map<Object,String> mp=new HashMap<Object, String>();
                        
                        mp.put(getusrname(),getusrname());
                        
                        oIDOperations.dropUsrRole(getorgname(), mp);
                        System.out.println("deleted user" +mp);
                        return deleteAction;
                    }
                
                    public void setEditAction(boolean EditAction) {
                        this.EditAction = EditAction;
                    }
                
                    public boolean isEditAction() {
                        FacesContext ctx = FacesContext.getCurrentInstance();
                        ExpressionFactory ef = ctx.getApplication().getExpressionFactory();
                        ValueExpression ve = ef.createValueExpression(ctx.getELContext(), "#{row.Username}",String.class);
                        //ValueExpression ve1 = ef.createValueExpression(ctx.getELContext(), "#{row.jobId}",String.class);
                       
                        String Username  = (String)ve.getValue(ctx.getELContext());
                        
                        if(this.getSelectedJobs() != null){
                            this.EditAction=getSelectedJobs().getAttribute("Username").equals(Username);
                        }
                        
                        return EditAction;
                    }
                
                    public void setCreateAction(boolean createAction) {
                        this.createAction = createAction;
                    }
                
                    public boolean isCreateAction() {
                        return createAction;
                    }
                
                    public void setSelectedJobs(ViewRowImpl newselectedJobs) {
                        this.selectedJobs = newselectedJobs;
                        if(this.selectedJobs != null){
                            this.EditAction = true;
                        }else{
                            this.EditAction = false;
                            this.createAction = false;
                            this.deleteAction = false;
                        }
                    }
                
                    public ViewRowImpl getSelectedJobs() {
                        return selectedJobs;
                    }