Change row values with afCommandButton

Hello,
I have a JSF Page with the following table:
RENTALS
RentalID
Date_Rented
Date_Returned
A_Status (Boolean CheckBox)
How can i insert the SYSDATE to the Date_Returned field of the selected row and Auto-Commit, with one single button?
Thanks.

hi 790166
Maybe this can help : "Doing two Declarative Operations with One Button"
at http://blogs.oracle.com/shay/2010/04/doing_two_declarative_operatio.html
(tip : You can use "Your Control Panel" to make your name visible in forum posts.)
success
Jan Vervecken

Similar Messages

  • Change "choiseListe" values with javascript

    Dear,
    Is it possible to change "choiseListe"  values  with javascript.
    Exemple il have a choseListe :
         Country //// Values
          USA            us
          France         fr
          Spain           sp
    When il click in a botton i whant to change this choceListe :
         Country //// Values
          Morocco           ma
         Portugal           pt
    Thanks

    Hi,
    Listboxes and dropdowns can be scripted against without too much difficulty.
    You would need something like this in the click event of the button:
    listbox1.rawValue = null; //clear previous choice
    listbox1.clearItems(); //clear the list items
    listbox1.addItem("Moocco", "ma"); //add new list items
    listbox1.additem("Portugal", "pt");
    Hope that helps,
    Niall

  • How to change a value with reference if inside of a tabControl?

    Hello,
    i have a Vi with a tabcontrol and two pages. On each page is a string-control (string1 and string2).
    Now i have second vi that gets the file-reference of the first vi and is called inside of the first vi.
    This reference do i want to use to change the value of the string-control.
    But i dont have access to "pages" when using the reference.
    Attached the two vis.
    Thanks for the help
    Attachments:
    main.vi ‏7 KB
    ref.vi ‏11 KB

    Easiest way that I know is to right click on the control itself and select "Create->Reference".
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • Change TextView value with Javascript

    Hello,
    I'm trying to find a way of changing the value of an HTMLB TextView on the client side with javascript.
    Do you know how to do that ? Cannot work it out...
    Many thanks
    Nicolas

    Hi,
    this can be a bit tricky, because you have to know, how to access the element. that means you need an unique id or an absolute position of the TextView-element
    if you can see, how to access the specific element in your client-pagesource, a possible javascript could be:
    document.getElementById("<id of element>").firstChild.nodeValue="My new Text"
    or access by name/count of the element:
    document.getElementsByName("<name of element>")[#position of occurance].firstChild.nodeValue="My new Text"
    kr, achim

  • Extended rebate - change payment values with Badi RBT_ENH_BADI_SETTLE

    Dear all
    I am trying to change payment values for an extended rebate agreement credit memo.
    According to the documentation it can be done using BADI
    RBT_ENH_BADI_SETTLE .
    I am using  method BONUS_VALUES_MODIFY , but no values
    has been changed in the credit memo.
    Does anyone have experience using the BADI ? Or any other idea how to change the payment values (not manually )?
    Thanks ,
    Miriam Harel

    Hello Miriam,
    I've got the same needs. Did you use finally this Badi ?
    If yes could you kindly tell me how did you use it?
    BR.
    Frédéric TURILLON.

  • USOBT_C almost empty after changing default values with SU24

    After the implementation of OSS Notes 0001378328, 0001382895 and 0001404093 I performed a change in SU24 on the default values of authorization object (2nd tab) S_ALV_LAYO for all transactions involved.
    I filtered all transactions with default value u2018Yesu2019 for this object and selected all these entries and changed them to u2018Nou2019.
    When creating new roles afterwards I noticed that no objects were pulled in in PFCG and when checking table USOBT_C I noticed that, apart from the 328 records I changed to No for S_ALV_LAYO the whole table was empty! In the development client  there are now just 328 records in this table whereas in de acceptance client there are 233,124 entries!
    Could you please find out the following:
    -          How could this happen?
    -          What can I do to restore table USOBT_C?
    I reported this bug also on OSS but maybe someone of you has had the same experience and can share the causes and solutions.
    Thank you!
    Lodewijk Borsboom

    > > To read such a huge text in the above suggested notes may become tiresome of not ofcourse worthless.
    > What is the use of posting a list of links or randon OSS note hits, when you are not sure whether they are usefull or not?
    >
    hmm.... though I am not sure and agree with the raise of OSS message for this issue, but when I read these notes after reading the query I found them to be notified to op.
    > Lodewijk can do that simple search himself. I always assume that the person asking a question has done a search before hand...
    >
    Agreed again. But not sure of his search result. May be his string missed some of these notes and can help him to check the program errors rectified in couple of Notes in 2009. But of course I confess about the uncertainty of the exact solution from my side.
    > If it is a basic requestion and easy answer with a link, then I delete it. It has no value to SDN. You are just attempting to do someone else's work for them, and that it not the case here.
    >
    > Please read the question carefully and answer specifically.
    >
    read and then posted the message. Also as I was not sure of solution to this particular error I surrendered in advance [mainly for you ]. Still I would like op to view the following notes on SAP Default value maintenance and if he has already done then that is great and I am just not helping with proper suggestion.
    [Note 1287998 - Problems when you maintain default authorization values|https://websmp230.sap-ag.de/sap%28bD1lbiZjPTAwMQ==%29/bc/bsp/spn/sapnotes/index2.htm?numm=1287998]
    [Note 1378328 - SU24: Error after deleting authorization default values|https://websmp230.sap-ag.de/sap%28bD1lbiZjPTAwMQ==%29/bc/bsp/spn/sapnotes/index2.htm?numm=1378328]
    Note 1382895 - SU24|Default value maintenance for authorization objects
    Note 1235912 - SU24|Display and maintenance of authorization default values|
    Hi Lodewijk,
    Did you check the change header for USOBT_C in CDHDR and CDPOS? Also let us updated with the reply from OSS please.
    regards,
    Dipanjan

  • How do I change elements values with DOM?

    Hi, I'm trying to get to understand the DOM tutorials but I'm struggling with some things.. Basically I need to take an xml structure, read it and then change it to another xml structure. For instance, if I have the html sentence:
    <p id="id10">One flight was found </p>
    I would like to change it to a vxml sentence like
    <vxml:prompt vxml:id="id10" vxml:bargein="false">One flight was found.</vxml:prompt>
    And I need to do that to an entire file. I can read the html with the DOM (I'm following the http://java.sun.com/webservices/jaxp/dist/1.1/docs/tutorial/dom/index.html tutorial) and show it without troubles, but I don't know and I can't find the functions that would allow me to modify the values. By values I mean both the element tags such as converting <p>..</p> to <prompt>..</prompt> and the attributes (like the id attribute). Could anybody help me here please?

    Thanks for that, but still can't do it. I'm using Xerces as you suggested. The following chunk is not actually what I need to do but I can't manage to get it working either. Shouldn't this:
    Document doc= new DocumentImpl();
    Element item = doc.createElement("name");
    item.setNodeValue("nameChanged");
    change the <name> tag to a <nameChanged> tag? When I output it it's still <name>.
    I'm getting awfully confused with all the factories and models (yes, sorry, quite a newcomer, but I still need to do this somehow). If the following task is not too long/troublesome, could somebody please help me out with the code? Imagine you have a file with the content:
    <label id="1">Hello</label>
    and using xerces you want to create another file, without changing the first one, with the content:
    <anotherLabel id="1">Hello<anotherLabel>
    Edited by: victorNik on Sep 13, 2007 6:02 AM

  • Datagrid change row event with tab AND/OR click ???

    I have a spark datagrid with the last two columns enterable.
    The natural approach for the user is to click in one and enter it then keep tabbing from cell to cell row to row to do his/her data entry.
    Selectionchanging works only if you click, the selection does not keep up with the tab from row to row.
    I want to enter the new data for each row when the user leaves the row.
    What is the best way to approach this particular (and common) need.
    Thanks
    Dan Pride

    Hi again,
    I think I was not clear enough. Basically I have a textfield assigned with a style, let's say TextFieldStyle1. What I want is to programmatically assign the textfield another style, say, TextFieldStyle2.
    How can I achieve that ?
    Many thanks !

  • Shared variable change its value with delay

    Hello. My shared variable shows an old value during some time after writing a new one. What is the reason?

    CKap,
    how to check buffering enabling for shared variables? I've attached pics of block diagrams: VirtualSpectrometer writes shared variable dLambda, and Camera reads it. And sometimes, even when VirtualSpectrometer attemp to write 0 to dLambda for the number of loop's periods, dLambda stay non-zero (to be exact +/-5.55) for a couple of seconds.
    Attachments:
    VirtualSpectrometerd.jpg ‏135 KB
    Camerad.jpg ‏386 KB

  • Error in changing row attribute value

    Hi,
    I am using JDeveloper 11.1.1.4 and developing a project using ADF-BC.
    In my application,I am displaying an adf table from DataControl->view object.
    The view object is based on an entity object which has composite primary key [Ex: Name and Rank]
    I have an requirement to swap selected row and its previous row's rank values on click of a button.
    I have written following code to achieve this.
    public void swapRows(ActionEvent actionEvent) {
    ViewObject rscMapVo = getRscMapViewObj();
    Row currRow = rscMapVo.getCurrentRow(); //------------->Current Row
    int currRowIndex = rscMapVo.getRangeIndexOf(currRow);
    Row prevRow = getRscMapVoIter().getRowSetIterator().getRowAtRangeIndex(currRowIndex - 1); // ------------> Previous Row
    Long currRowRank = ((Number)currRow.getAttribute("Rank")).longValue();
    Long prevRowRank = ((Number)prevRow.getAttribute("Rank")).longValue();
    //Actual Swapping
    prevRow.setAttribute("Rank", new Number(currRowRank));
    currRow.setAttribute("Rank", new Number(prevRowRank));
    adfFacesContext.addPartialTarget(tblRSCMap);
    }//End of method
    This is giving me the exception
    1)Rank     Too many objects match the primary key oracle.jbo.Key[Group_1 7 ]. [Name is Group_1 and Rank is 7]
    2)Rank     Too many objects match the primary key oracle.jbo.Key[Group_1 8 ] .[Name is Group_1 and Rank is 8]
    If instead of actual rank values I update it to some random number it updates properly. i.e for example prevRow.setAttribute("Rank", new Number(900)); and currRow.setAttribute("Rank", new Number(800));
    The exception occurs when I change one row value with a value that is already present in other row there by giving unique constraint problem.
    How to overcome this problem??
    Is there any other way of implemeting this solution.
    I want the changed attribute values to commit to DB only after final commit but not immediately.
    Please advice/suggest.
    Thanks,
    Praveen

    Hi RajGopal,
    Even in the model layer it gives the same error.
    steps done
    1.Create an attribute in entity and set its value
    2.Override the method doDML in EntityImpl
    protected void doDML(int operation, TransactionEvent e) {
    try{     
    if(this.getTestRank() != null){
    this.setRank(this.getTestRank());
    }else{
    System.out.println("Test rank null");
    super.doDML(operation, e);
    }catch(Exception excep){
    System.out.println("Eceptin in update");
    excep.printStackTrace();
    Exception
    oracle.jbo.TooManyObjectsException: JBO-25013: Too many objects match the primary key oracle.jbo.Key[Group_1 28 ].
         at oracle.jbo.server.EntityCache.throwTooManyObjectsException(EntityCache.java:588)
         at oracle.jbo.server.EntityCache.handleDuplicateKey(EntityCache.java:596)
         at oracle.jbo.server.EntityCache.addForAltKey(EntityCache.java:990)
         at oracle.jbo.server.EntityCache.replaceForAltKey(EntityCache.java:1739)
         at oracle.jbo.server.EntityImpl.setAttributeValueInternal(EntityImpl.java:3952)
    Thanks,
    Praveen

  • How to change UDF value in system form if its invisible or inactive?

    Hi all,
    I need to compute some document total values and save them on UDFs defined on Sales Order Header document, when the user adds a new order line.
    However I must not allow the user to change them (or see them). Also, there are other UDFs on the Sales Order Header that the user must be allowed to change...
    Is there any way to control this? If I set a UDF as not 'Active', I cannot change its value with programming.
    I'm using the following command to change a UDF value on the Sales Order form:
                        Form form = B1Connections.theAppl.Forms.GetForm("-139", pVal.FormTypeCount);
                        EditText et = (EditText)form2.Items.Item("U_TotalTax1").Specific;
                        et.Value = "10";     // this raises an exception "Form item is not editable"
    Is there any other way to change this UDF contents (maybe with datasources? etc)
    Thanks all,
    Manuel Dias

    Hi You can Enable/Disable the item after your transaction. follows the code
    oForm.Items.Item("U_TotalTax1").Enabled = True
    oEdit.value=10
    oForm.Items.Item("U_TotalTax1").Enabled = False
    Try this
    Manmath

  • Can multisim be set to automatically change component values?

    Hi all,
    I'm a little new to the newest versions of Multisim (currently using 12), the last version I used was about 10+ years ago, so bear with me if my question seems too simple...
    I'm trying to simulate a boost converter and was wondering if there was a way for multisim to automatically change component values with respect to time. In other words, I give it a rannge of values and it will cycle through them -or just vary them in any way at all? If it's available, I might have not seen it. Thanks for all your time!

    Hi,
    The Step Voltage source is basically a piecewise linear source with 4 data points, so instead of using the step function you can use the PWL source instead and add as many data points as you want. If you are not sure what a PWL source is, refer to this:
    http://www.ni.com/white-paper/11591/en/
    Tien P.
    National Instruments

  • Changing  Condition values and Condition currency of PO to local currency.

    Dear Friends,
    I have a weird request.
    I have  a PO which has been created in USD. My local currency is INR.
    Normally, when i display the PO, under conditions tab, the condition values and currency will be displayed in USD.
    My requirement is like, i want to change and simulate the condition values in USD to local currency (INR) based on current exchange rate.
    Is there any way i can simulate the same. Kindly help.
    Thanks and Regards
    Sandeep Sivan

    I am not sure that it can be done through the config. You can change the values with the correct user exit and change the values accordingly before the values are displayed.
    Regards,
    FS

  • Change field value in a table, based on another field value in the same row (for each added row)

    Please Help, I want to change field value in a table, based on another field value in the same row (for each added row)
    I am using this code :
    <HTML>
    <HEAD>
    <SCRIPT>
    function addRow(tableID) {
    var table = document.getElementById(tableID);
    var rowCount = table.rows.length;
    var row = table.insertRow(rowCount);
    var colCount = table.rows[0].cells.length;
    for(var i=0; i<colCount; i++ ) {
    var newcell = row.insertCell(i);
    newcell.innerHTML = table.rows[1].cells[i].innerHTML;
    switch(newcell.childNodes[0].type) {
    case "text":
    newcell.childNodes[0].value = "";
    break;
    case "checkbox":
    newcell.childNodes[0].checked = false;
    break;
    case "select-one":
    newcell.childNodes[0].selectedIndex = 0;
    break;}}}
    function deleteRow(tableID) {
    try {var table = document.getElementById(tableID);
    var rowCount = table.rows.length;
    for(var i=0; i<rowCount; i++) {
    var row = table.rows[i];
    var chkbox = row.cells[0].childNodes[0];
    if(null != chkbox && true == chkbox.checked) {
    if(rowCount <= 2) {
    alert("Cannot delete all the rows.");
    break;}
    table.deleteRow(i);
    rowCount--;
    i--;}}}catch(e) {alert(e);}}
    </SCRIPT>
    </HEAD>
    <BODY>
    <INPUT type="button" value="Add Row" onClick="addRow('dataTable')" />
    <INPUT type="button" value="Delete Row" onClick="deleteRow('dataTable')" />
    <TABLE id="dataTable" width="350px" border="1">
    <TR>
    <TD width="32"></TD>
    <TD width="119" align="center"><strong>Activity</strong></TD>
    <TD width="177" align="center"><strong>Cost</strong></TD>
    </TR>
    <TR>
    <TD><INPUT type="checkbox" name="chk"/></TD>
    <TD>
    <select name="s1" id="s1">
    <option value="1">1</option>
    <option value="2">2</option>
    <option value="3">3</option>
    </select>
    </TD>
    <TD><input type="text" name="txt1" id="txt1"></TD>
    </TR>
    </TABLE>
    </BODY>
    </HTML>

    Hi,
    Let me make sure u r working with table control.
    First u have to create a event(VALIDATE) to do the validation.
    Inside the event,
    1. First get the current index where user has pointed the curson
    2. Once u get the index read the internal table with index value.
    3. Now u can compare the col1 and col2 values and populate the error message.
    1. DATA : lo_elt TYPE REF TO if_wd_context_element,
                   l_index type i.
    lo_elt = wdevent->get_context_element( name = 'CONTEXT_ELEMENT' ).
         CALL METHOD LO_ELT->GET_INDEX( RECEIVING  MY_INDEX = l_index.
    above code should be written inside the event.
    Thanks,

  • Error while saving dynamic row values of datagrid with record.

    hi friends,
    i am trying to add dynamic row in datagrid and save that value with record.i succeeded in first part while i am saving the record the error show like this.
    errro:Property fromAmount not found on com.ci.view.Task and there is no default value.
    how i resolve this error.
    any suggession welcom
    thanks in advance.
    B.venkatesan
    code:
    package:
    package com.ci.view
        [Bindable]
        public class Task
            public function Task(frmAmount:String,toAmount:String,commissionPercentage:String)
                this.frmAmount=frmAmount;
                this.toAmount=toAmount;
                this.commissionPercentage=commissionPercentage;
            public var frmAmount:String;
            public var toAmount:String;
            public var commissionPercentage:String;
    main mxml:
    [Bindable]
                private var tasks:ArrayCollection;
                private static const ADD_TASK:String= "";
                private function init():void
                    tasks = new ArrayCollection();
                    tasks.addItem(new Task("0","1000","0"));
                    tasks.addItem({frmAmount:ADD_TASK});
                private function checkEdit(e:DataGridEvent):void
                    // Do not allow editing of Add Task row except for
                    // "Click to Add" column
                    if(e.rowIndex == tasks.length - 1 && e.columnIndex != 0)
                        e.preventDefault();
                private function editEnd(e:DataGridEvent):void
                    // Adding a new task
                    if(e.rowIndex == tasks.length - 1)
                        var txtIn:TextInput =TextInput(e.currentTarget.itemEditorInstance);
                        var txtIn1:TextInput =TextInput(e.currentTarget.itemEditorInstance);
                        var txtIn2:TextInput =TextInput(e.currentTarget.itemEditorInstance);
                        var dt:Object = e.itemRenderer.data;
                        // Add new task
                        if((txtIn.text) != ADD_TASK)
                            var x:String=String(txtIn.text);
                            tasks.addItemAt(new Task("", "", ""), e.rowIndex);
                        // Destroy item editor
                        commPlanDetGrid.destroyItemEditor();
                        // Stop default behavior
                        e.preventDefault();

    Venktesan,
    You are trying compare String and int..! which is not possible try to case the txtIn.text to int using parseInt(txtIn.text).
    ORIGINAL:
    if(txtIn.text != ADD_TASK).---->error : Comparison between a value with static type String and a possibly unrelated type int
                        tasks.addItemAt(new Task(txtIn.text, 0, ""), e.rowIndex);----> error:Implicit coercion of a value of type String to an unrelated type int.
    EDITED:
    if(parseInt(txtIn.text) != ADD_TASK).---->error : Comparison between a value with static type String and a possibly unrelated type int
                        tasks.addItemAt(new Task(parseInt(txtIn.text), 0, ""), e.rowIndex);----> error:Implicit coercion of a value of type String to an unrelated type int.
    Thanks
    Pradeep

Maybe you are looking for

  • What is difference between SUNW,UltraSPARC-IIIi and  US-III+

    Hi All, I am trying to finalise a VxVM version for a Solaris 8 version. On the Solaris machine I see, System Configuration: Sun Microsystems sun4u Sun Fire 280R (UltraSPARC-III+) System clock frequency: 150 MHz Memory size: 4096 Megabytes ===========

  • A/P Invoice created from Approved Drafts, through DIAPI

    Please I need help with this error. I need create A/P Invoice  from approved drafts with DIAPI. There are no errors if the "A/P Invoice" is copy of "Purchase Order" or without base document. In this case the Invoice is created without problems. But,

  • Using Time Capsule as External Drive for iTunes Music Folder in iTunes 9

    First, prior to upgrading to Snow Leopard and iTunes 9, I had my 210 GB of music on a 1TB Time Capsule which I accessed wirelessly through my Macbook Black and I set my path to the "iTunes Music (External) Folder" I created on the Time Capsule as the

  • Macbook Pro does not boot after replacing HD

    I have a Macbook Pro that I bought in early 2007. It came with 10.4, and I have since upgraded to 10.5, and then 10.6. I decided to upgrade the original internal HD to a 500GB HD. I used Time Machine to back up the orignal HD. After performing the su

  • How to configure roles at runtime without changing application code?

    Hi, We have implemented Custom Login Module security for our application. Our requirement is to configure the roles without changing the application code. Our Authentication Type is 'JAAS With Custom Login Module' and Authorization Type is 'JAAS'. Ac