Intercept delete action in DataAction

Hi,
I use jdev10g preview.
I put in uix page a sample read-only table.
I put delete action from my AM.
I want commit after delete, but how known that's delete action is fired in DataAction ?

The simplest way would be to chain actions on the pageflow
Drop a Data Action and drop your Delete custom method from the Data Control Palette onto that. The wire up any input parameters into the paramName[n] set-properties in the Struts-Config
The Drop another data action and drop the commit operation on that, wire the delete action to the commit action with a success and then the commit will be automatically issued once the delete action has finished.

Similar Messages

  • Using a link to trigger a delete action on form page?

    Hello,
    I have been unable to find an explanation about how to do this in the documentation, these forums or the old interakt forums.
    Is it possible to use a link to trigger the delete action on a form page?
    If so how is it done?
    Thanks in advance!

    Sorry Purple.. I know that there is a delete link that triggers the delete transaction on the form page..
    The question was if anybody knew if I am able to use a link to trigger that delete transaction (on the form page), much like a dynamic list has a link that will trigger the delete transaction on the form page.
    I don't want to use a dynamic list in this case though. :)
    Thanks anyways,
    Drew

  • How to intercept clickToEdit action in af table?

    Hello,
    I am using EditingMode: clickToEdit in af table.
    The functionality i am trying to achieve is when user clicks on table row then he can change some values. It is straight forward.
    What is tricky is that i am looking to show LOV (af:selectOneChoice) in one of the attribute and the selection should depend on other attribute's value.
    For example I have columns A and B.
    if A value equals to 1 then B should show LOV only with selection of values 10,11,12
    if A value equals to 2 then B should show LOV only with selection of values 21.22.23 etc. (this is simplify example in real it is more complected and LOV is depend on different parameters so harcoding different af:selectOneChoice elements and rendering only one is not the option - only dynamic LOV)
    So depending on what row user clicks column B should show different list of values.
    I am dancing around to find how to intercept clickToEdit action so i can dynamically change list of values - meanwhile unsuccessfully. The option is to create special popup for editing a row - but somehow i want to avoid this.
    Any suggestions?

    Hi,
    I think the problem is talking about cascading LOV. You don't need to intercept clickToEdit action.
    You can search by google : "cascading LOV ADF"
    It will solve your problem.
    Thanks.
    - LSR

  • Cancel a delete action in a trigger

    Hi,
    I would like to know the best way to cancel a delete in a trigger, I want to instead change a Field called Active to 'N'
    My application is built on views that exclude records with this flag set to 'N'
    I have found the IF DELETING ('id') THEN syntax which should be fine to capture the delete, but what is the best way to then cancel the delete?
    Thanks in advance
    cl3ft

    Hi,
    I don't think you can cancel the delete action in the trigger if you want to perform another action afterwards. You can cancel the delete action by raising an exception (e.g. with RAISE_APPLICATION_ERROR(-20001,'No delete allowed') ;)
    To cancel the delete action and perform an action afterwards I would suggest to create a view on the table containing all columns. On that view, you can define an INSTEAD OF DELETE trigger. In this trigger, simply update the column and do not perform any delete action. This should do the job for you.
    Regards
    Stephan

  • How to Implement basic Insert ,Update and delete Actions

    Hi all,
              i want to implement 1)INSERT 2)UPDATE 3)DELETE actions in webdynpro application means i have to add a new record to my R/3 backend and update and delete records from my database
    can anyone tell me how to do these actions
    Regards
    Padma N

    Hi Murtuza ,
                           I have 2 views in my application.In the first view i enterd some purchaseorder number and clicked serarch button.The items regarding that purchaseorder gets populated in the table which is in second view.All the data is in R/3 backend system.
    the code i used to get the details of that particular purchaseorder is
    try {
    wdcontext.currentZ_Matrls_For_Inputlement().modelObiect.execte();
    catch(RFCException e){
    /* Catch the Exception Here */
    Here now i want to delete one record of that particular purchaseorder from the database.So Wat should be the code to delete record from R/3 Model
    Regards
    Padma N

  • How can I customise a default delete action

    Dear's
    In Apex, I have report with edit button. By cliking on edit I can see the edit window with a delete button. I want to restrict this with some checks .
    The delete button should be displayed always.
    I want to utilise the default delete action, I don't want to write a code for deletion.
    On click , if the condition restrict , it should give message and should not delete that record.
    Otherwise the record shoud be deletd.
    Dennis
    Edited by: DJ on Mar 20, 2012 11:41 PM

    Dear trent
    Thanks,
    Actually I wanted use a complex condition, I want to write a funtion returing some value. Based on that I want to show a message or I want to do the delete action. If i am putting some condition for the delete button, if false, the button will not be displayed. This should not happen.
    What you mean by validation here, On which item or which action or where should I put the validation code in my senario.
    Dennis

  • How to get  log of user's delete action on Content Items?

    Hi all,
    When one user edit a Content Item, we can get the log about this action. But when user delete this content Item, I couldn't find out the log about this action.
    I wonder that WebCenter Content have any function to logging the delete action on Content Items?
    If it have, where I can find it ?
    Thanks a lot!

    If you are strictly interested in just "deletes", you can query the table "DocumentHistory". Basic data like checkin, checkout, update, and delete actions against a document is recorded there, along with the user and date.
    If you need deeper data however, as Srinath noted, Content Tracker is built for those deeper requests.

  • Popup to confirm a "delete" action

    Hello,
    I created a layer that allow you to delete some data in  database. I would like to create a popup that would appears when the user click on delete, and where it would be written something like "are you sure you want to delete this row ?"
    if he would click on "confirm", it would delete. Otherwise, if would on cancel, nothing would happen.
    the problem is I am not able not lauch the delete action only if he clicked on "confirm". Can somebody help me please?
    Thank you
    Regards
    Damien

    @ basheer : thank you very much, now it works.
    @ hema latha : I had the problem, so I used a Timer with a 0.05 time but with a specific guard condition. I have a variable that is initialized at 0. when I click on "delete" in my popup, it set the variable at 1. (When the variable ==1, the Timer is triggered). My system is configured to set the variable at 0 on each refresh. That's the only way I found. Hope it will help.
    Regards,
    And a happy new year !!!

  • Strange behavior in a table with dropTarget and delete action

    I am having a strange behavior in a table with drag and drop and action component to delete row.
    Steps:
    Drag the first row to the table and appears in the destination table (works well)
    Select and change the value by 156, appears an error (works fine)
    delete the row, the row disappears (works well)
    Add the first row again and the value is 156 instead of 158 (why ????)
    I guess the error is the deletion that is not correct, but do not know how?
    Can anyone help?
    I add the source code if you see where I'm wrong
    Java class:
    +public class BeanExample {+
    private ArrayList<RowExample> starttValues;
    private ArrayList<RowExample> endValues;
    +public BeanExample() {+
    super();
    +}+
    +public void setStarttValues(ArrayList<BeanExample.RowExample> starttValues) {+
    this.starttValues = starttValues;
    +}+
    +public ArrayList<BeanExample.RowExample> getStarttValues() {+
    +if (starttValues == null) {+
    starttValues = new ArrayList<BeanExample.RowExample>();
    starttValues.add(new RowExample("1", new Number(158)));
    starttValues.add(new RowExample("21", new Number(12565464)));
    +}+
    return starttValues;
    +}+
    +public void setEndValues(ArrayList<BeanExample.RowExample> endValues) {+
    this.endValues = endValues;
    +}+
    +public ArrayList<BeanExample.RowExample> getEndValues() {+
    +if (endValues == null) {+
    endValues = new ArrayList<BeanExample.RowExample>();
    +}+
    return endValues;
    +}+
    +public void validatorExample(FacesContext facesContext, UIComponent uIComponent, Object object) {+
    Number number = (Number)object;
    +if ((number.longValue() % 2) == 0) {+
    FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR, "ES PAR", "ES PAR");
    throw new ValidatorException(message);
    +}+
    +}+
    +public DnDAction handleDrop(DropEvent dropEvent) {+
    Transferable transferable = dropEvent.getTransferable();
    DataFlavor<RowKeySet> rowKeySetFlavor = DataFlavor.getDataFlavor(RowKeySet.class, "loteDrag");
    RowKeySet rowKeySet = transferable.getData(rowKeySetFlavor);
    +if (rowKeySet != null) {+
    CollectionModel dragModel = transferable.getData(CollectionModel.class);
    +if (dragModel != null) {+
    Object currKey = rowKeySet.iterator().next();
    dragModel.setRowKey(currKey);
    RowExample table = (RowExample)dragModel.getRowData();
    getEndValues().add(new RowExample(table.getId(), table.getValue()));
    return dropEvent.getProposedAction();
    +}+
    +}+
    return DnDAction.NONE;
    +}+
    +public void borrarFila(ActionEvent actionEvent) {+
    endValues.remove(0);            RequestContext.getCurrentInstance().addPartialTarget(FacesContext.getCurrentInstance().getViewRoot().findComponent("pc1:t2"));
    +}+
    +public static class RowExample {+
    private String id;
    private Number value;
    +public RowExample(String id, Number value) {+
    super();
    this.id = id;
    this.value = value;
    +}+
    +public void setId(String id) {+
    this.id = id;
    +}+
    +public String getId() {+
    return id;
    +}+
    +public void setValue(Number value) {+
    this.value = value;
    +}+
    +public Number getValue() {+
    return value;
    +}+
    +}+
    +}+JSF
    +<?xml version='1.0' encoding='windows-1252'?>+
    +<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"+
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    +<jsp:directive.page contentType="text/html;charset=windows-1252"/>+
    +<f:view>+
    +<af:document id="d1">+
    +<af:form id="f1">+
    +<af:panelGroupLayout id="pgl1">+
    +<af:table value="#{beanExample.starttValues}" var="row"+
    rowBandingInterval="0" id="t1" rowSelection="single"
    displayRow="selected" contentDelivery="immediate">
    +<af:column sortable="false" headerText="Id" align="start" id="c2">+
    +<af:outputText value="#{row.id}" id="ot1"/>+
    +</af:column>+
    +<af:column sortable="false" headerText="Value" align="start" id="c1">+
    +<af:outputText value="#{row.value}" id="ot2"/>+
    +</af:column>+
    +<af:collectionDragSource actions="COPY" modelName="loteDrag"/>+
    +</af:table>+
    +<af:panelCollection id="pc1">+
    +<f:facet name="toolbar" >+
    +<af:toolbar id="dc_t2" >+
    +<af:commandToolbarButton shortDesc="Delete"+
    icon="/imagesDemo/delete_ena.png"
    id="dc_ctb3" immediate="true"
    +actionListener="#{beanExample.borrarFila}"/>+
    +</af:toolbar>+
    +</f:facet>+
    +<af:table value="#{beanExample.endValues}" var="row"+
    +rowBandingInterval="0" id="t2">+
    +<af:column sortable="false" headerText="Id" align="start" id="c3">+
    +<af:outputText value="#{row.id}" id="ot3"/>+
    +</af:column>+
    +<af:column sortable="false" headerText="Value" align="start" id="c4" >+
    +<af:inputText value="#{row.value}" autoSubmit="true" id="it1" validator="#{beanExample.validatorExample}"/>+
    +</af:column>+
    +<af:collectionDropTarget actions="COPY" modelName="loteDrag"+
    +dropListener="#{beanExample.handleDrop}"/>+
    +</af:table>+
    +</af:panelCollection>+
    +</af:panelGroupLayout>+
    +</af:form>+
    +</af:document>+
    +</f:view>+
    +</jsp:root>+

    I think the problem is the validator
    I changed the practical case, I added an InputText to enter new values in the first row.
    +<af:inputText immediate="true" label="new value" id="it2"+
    +valueChangeListener="#{beanExample.newvalue}" autoSubmit="true"/>+
    +public void newvalue (ValueChangeEvent valueChangeEvent) {+
    +String valor = (String)valueChangeEvent.getNewValue();+
    +Number valorNumber=null;+
    +try {+
    +valorNumber = new Number (valor);+
    +} catch (SQLException e) {+
    +}+
    +RowExample example = (RowExample) endValues.get(0);+
    +example.setValue(valorNumber);+
    +example.setId(valorNumber.toString());+
    +RichTable table = (RichTable)FacesContext.getCurrentInstance().getViewRoot().findComponent(id);+
    +RequestContext.getCurrentInstance().addPartialTarget(table);+
    +}+
    Case 1
    I drag the first row to the target table (ok)
    The new row appears (ok)
    Enter the value 77 in the InputText (ok)
    id content and value change (ok)
    Case2
    I drag the first row to the destination table
    The new row appears (ok)
    Change the value of the first row by 80 (ok)
    errors appears (by validator) (ok)
    Enter the value 77 in the InputText (ok)
    the id is changed but the value NO (*KO*)
    I do not understand the behavior
    Edited by: josefuente on 27-oct-2010 16:03

  • Change / Delete action link & Printing in WDA

    Hi Experts,
    Q1. In one of my ALV table column i need to put link like this ' "Change" / "Display" '. Means in 1 column 2 Action LInk one is Change the other will be display. If user press on Change it will open another view in edit mode if user press on delete it will open the view in display mode.Also please tell what will be the domain of that field in the structure.
    Q2. Need a print button at the top of all the pages in my application with printing functionality. I am not sure it is psible in WDA or not. In few threads i read that we can achieve this using BSP & java scripting not with WDA.
    Can anyone please help me on this.
    Regards,
    Nik

    Q1.  You can't add two cell editors to the same column.  You will need to make these two separate columns.
    >Also please tell what will be the domain of that field in the structure.
    You don't need any field at all. You can add a column to the ALV output that doesn't exist in the underlying data dictionary structure.
    Q2.  Not currently possible.  There is print functionality in the ALV that uses the Adobe Document Services to output a PDF for printing of just the ALV content.  You can use the Print functionality in the browser itself.  SAP is currently developing print functionality like you describe targeted for possible inclusion in NetWeaver 7.02 (future features are always subject to change however).

  • Starting workflow on delete action

    Hi,
    I am updating another table in the database whenever an attribute value is changed (insert, update, delete) in the master data table.
    To perform this action, I have created a business rule (with event as "has changed") and it triggers a workflow to perform the table update.  Sadly, the business rule is not triggered whenever a value is deleted in the master data table. Therefore
    the other table in the database is inconsitent.
    Can you please provide me a way on how to modify the business rule and trigger the workflow whenever a record is deleted in MDS.
    Thanks in advance!

    The "has changed" only apply to attribute update. Currently, there is no way to trigger the business rule for soft or hard delete member.
    To sync the MDS table to another table, the best option is expose the MDS entity to subscription view and use SQL merge to merge it into another table. 

  • How to delete action termination record?

    Hello ,
    Am getting a dump while deleting a termination action record.
    can any on let me know , if there are any pre-requisites to delete the termination action infotype.

    Hi
    In continuation to our mates suggesition
    Can you check the feature IGMOD and MSN20 feature assignment in PE03 and
    SPROPAPA>Customizing Procedure>Action-->Define Info group.
    What are the info types you have configured for termination action,
    Regards,
    MVR
    Edited by: MVRmvr on Oct 8, 2010 1:56 PM

  • Update as a part of Delete action

    Hi,
    I'm using Jdev11g, ADF BC and ADF faces RC.
    I have a table of records in the UI. In the toolbar I have dragged and dropped Delete method as a button.
    What I want to implement is when a user selects a row and clicks Delete button, I dont want the real delete to execute but instead I want to update a column( called 'Status' ) of that row to 'DELETED'.
    Also, same time the Delete button click should do a commit. Plz assist.
    Thanks,
    Anu

    Hi,
    Here is an approach.
    Basically you dont want to delete at all.
    1) create a method in your Application Module java class e.g. changeStatusOfViewObjectNameHere()
    Inside the method, get the ViewObject you want and get the currentRow.
    For this current row, change the attribute value you want with the new value you want
    e.g: getVO().getCurrentRow().setAttribute("attnameHere",yourValueHere);
    2) expose this method in the client interface of your AM.
    3) in your jspx pageDef, create a methodAction in your bindings and point to the previously created method in your AM.
    4) in your jspx pageDef, add the commit action as well.
    5) In the Delete button, remove the ActionListener that is created by default.
    6) In the ActionListener of that button, through the wizard, create a new method in your backing bean ( If the backing bean does not exist, create one).
    7) In your backing bean, do the following:
    First you need to change the status value of the current row. So, you need to call the AM method already exposed in the bindings:
    OperationBinding oper = ADFUtils.getDCBindingContainer().getOperationBinding("*changeStatusOfViewObjectNameHere*");
    you can find the ADFUtils in the sample applications in the JDev I think. Or search the Web.
    After this call, you have to commit the changes:
    So, another OperationBinding should be called:
    OperationBinding oper = ADFUtils.getDCBindingContainer().getOperationBinding("*commit*");
    make the Delete button to be partialSubmit=false, in order to refresh the whole page.
    Hope this will help you.
    Regards,
    Dimitris.

  • How to delete action created in automator

    Hello,
    I've created an action where I can copy and paste file path from the finder but it's caused some issues when I started to copy file names into another. The correct file name is not showing up. Basically, I want to delete this action but not sure where I can find it in my computer.
    BTW: I'm working on OS Mavericks.
    Does anyone has a solution to this problem.
    Thanks,
    sntm

    Hello,
    What is the right way to delete the SWCV from IR and Configuration scenario from ID .
    You start from the top to the bottom, by this I mean you delete objects in this order
    ESR:
    Operation Mappings -> Message Mappings -> Imported Archives -> Service Interfaces -> Message Types -> Data Types -> Context Objects  -> External Definitions
    ID:
    Receiver Agreement -> Sender Agreement -> Interface Determination -> Receiver Determination -> Communication Channels -> Business Component/Business System -> Party
    I am using PI 7.11 version. Also, want to know that ,if i want to take backup , then how to do that.
    Transport your SLD, All ESR objects under that SCV, All ID objects under that SCV as a file and then save in your local directory. That way, even if you deleted the objects you can still reimport them when the need comes.
    Hope this helps,
    Mark

  • How do I make JHeadstart confirm delete action

    Hi gurus
    How do I make my JHeadstart application confirm my action when I try to delete one or more rows? I have not seen any attribute to specify this... can it be done?
    Claus

    You can do this by modifying the doEvent javascript function in form.js as follows:
    // doEvent submit routerForm
    function doEvent(event, eventValue, checkForChanges, rowKeyStr ,doRollback)
    // reset hidden fields for IE
    resetValues(routerFormName);
    var form = getRouterForm();
    if (form.action == "" || form.action == null)
    form.action = document.forms[dataFormName].action;
    var confirmedDelete = true;
    if (event == "Delete" )
    var confirmedDelete = false;
    // hardcoded message, you could use confirm(getMessage("messagekey")) instead
    confirmedDelete = confirm("Are you sure you want to delete this record");
    if(checkForChanges == null)
    checkForChanges = true;
    var changed = false;
    var confirmed;
    if (!ignoreChanges && checkForChanges && confirmedDelete)
    changed = hasChanges();
    if (changed)
    confirmed = confirm(getMessage("hasChanged"));
    if ((!changed || confirmed) && confirmedDelete)
    form.event.value = event;
    form.rowKeyStr.value = rowKeyStr;
    form.eventValue.value = eventValue;
    if(doRollback == null)
    doRollback = 'true';
    form.event_Rollback.value = doRollback;
    form.submit()
    Steven Davelaar,
    JHeadstart Team.

Maybe you are looking for

  • How to set up email notification

    Hi, How can I set up email notification in AV 10.2.3? I have gone through the admin and auditor docs but could not find any mention of it. Was not able to find the navigation on the AV console either. Someone posted a documentation URL link in the fo

  • Converting report output to pdf by submit spooland email to multiple vendor

    Hi all,            my current program converting the report output to pdf and then downaloding andsending  to vendor email.If user enter single vendor is o.k. but if suppose user enter multiple vendors,report is dipalying with multiple vendor informa

  • How do I create package groups from a set of packages?

    Hello, Suppose I have a set of packages to be grouped together so that I can do pacman -S <pkg_group_name> to install all the packages in that group, how do I do this? Thanks for your help, Anand

  • HT201304 How do I disable parental controls?

    I forgot the parental controls pass code, and I need to unlock it. I do not have a computer with me (I use a computer at work only). Is there a way to disable it without a computer? I'm asking this question on his ipad. Thank you for your help!

  • Improve the execution of code

    hi, i given my program. can any one tell me how to improve the execution speed of this program. it is working very slow in quality system. *& Report  ZQMRSMNMWIPRPT                                              * REPORT  zqmrsmnmwiprpt   LINE-SIZE 328