Replace save button with update, after data is added in db.

I am forking on a AIR desktop application with sqlite database.
I have a form created in a custom component which have 2 buttons save and update.
I have created a class to handle all database related functionalities.
when i click on the save button of the form, data is inserted into the table.
So far it's working fine.
No when data is inserted in database, i want to disable the save button, and activate the update button on the form. To run the update query i need id of the last added row, which i can obtain from lastInsertRowID on SQLEvent.RESULT event.
My question is how can i pass this ID from my class to the custom component?
Best Regards,
Alok Jain

Hi Alok,
You can create a public bindable property in your custom component. And set this property from a class which handles your DB activitis. You can find explore BindingUtils class if you want to run some function when a particular property value is changed.
Hope this helps.

Similar Messages

  • Problem with updating pricing date using BAPI_SALESORDER_CHANGE

    Hi,
    I need to update pricing date on sales order (but only on item level).
    I have been trying to use  BAPI_SALESORDER_CHANGE but nothing changes.Bapi returns no errors, ends with success.
    I hoped that bapi would change not only pricing date but also recalculate things the date affected.
    Here is my code:
    ls_head_inx-updateflag = 'U'.
    ls_bapisdls-pricing = 'C'.
    ls_item-itm_number = sales_order_posnr
    ls_item-price_date = new_price_date
    APPEND ls_item TO lt_item.
    ls_item_inx-itm_number = sales_order_posnr
    ls_item_inx-updateflag = 'U'.
    ls_item_inx-price_date = 'X'.
    APPEND ls_item_inx TO lt_item_inx.
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
              EXPORTING
                salesdocument     = sales_order
                order_header_inx = ls_head_inx
                logic_switch         = ls_bapisdls
              TABLES
                return                 = lt_return
                order_item_in     = lt_item
                order_item_inx   = lt_item_inx
    Thanks & Regards,
    Mario

    Mario,
    I run same code as yours and work for me fine, able to update ITEM pricing date.
    I suppose you are using BAPI_TRANSACTION_COMMIT after your BAPI call, then only it will work.
    Also note that VBKD table stores this date for header and item. In my system, there are generally only header rows in that table, but a new item row gets generated when I change the item date with the BAPI to some other date. Also, this BAPI sometimes issues a W message instead of ERROR for something like non-existing items, so carefully check your RETURN table too.
    'Item 000002 does not exist' as WARNING message, so might be considering it as a success.
    If nothing works, try to do the same thing for the same data using VA02 and check . If that works, BAPI will work surely.
    Regards,
    Diwakar

  • When trying to install ios5 on my iphone, I get error message that there is a problem with backup, if I continue with update all data on my phone will deleted. I cancelled the update and phone is fine. Anyone know the cause?

    When trying to install io5 on my iphone4 I get an error message during the updtae that there is a problem with backup and if I continue with the update, all the data will be deleted from my phone. I cancelled the update and my phone is fne. Has anyone else experience this? What is the cause/solution?
    Yhanks!

    DON'T DO IT! Read the threads ... there is a MAJOR problem with updating iPhones 3GS/4 to iOS 5.
    Take it to the Apple store and ask them to do it.
    I repeat: DON'T DO IT YOURSELF.
    (Voice of experience.)

  • What are the setting for Save button for saving plan data in WAD template

    Hi,
    i created SAVE button in Webtemplate for saving plan data.But this button is not
    active.is there any setting for this?
    thanks in advance
    chandu

    Hi Chandu,
    The settings to Configure the  Save function.
    Right click the Button Group Item ® Properties ®  * Button    ® 
    Type Caption  ‘Save’ ® Command    ® Select ‘All Commands’ Tab ® 
    De-select ‘Execute Planning Function’ and then select checkbox ‘Save
    Changed Data’ ® Double click on ‘Save Changed Data’ ® OK ® OK ® Save your template.
    *pls assign points,if info is useful*
    Regards
    CSM Reddy

  • How to enable the "update file" button to update the data template

    We have an escalated customer bug that the chinese character does not display correctly on report. We want to update the data template xml file on customer site to test the fix. However, when the customer login using "XML publisher Administrator" responsitility, select function "Data Definitions", search and then update the definition, on the update page, the button "update file" next to "Data Template" is disabled. Anyone know how to enable the button?
    screenshot at:
    ftp://bugftp.oraclecorp.com/upload/bug6649637/CannotUpdate.doc
    Thanks,
    Wei

    Unless until it is a Manual Journal, SLA page doesn't give you the provision to change them.
    Even for Manual Journal, it won't allow you to change, if that is transferred to GL.
    Only option is to UNDO the accounting and correct the setup to create correct journals. You may contact Oracle Support.
    By
    Vamsi

  • Replace g60 modem with voice fax data mpdem

    I have a HP G60-23US lap top.
    For a special application I need to replace the basic "data/fax" modem with a "voice/data" modem.  Where can I find detailed specifications for size of the basic CX 11256 modem so I can look for a replacement.

    Hello gerhard38. I understand you are looking for specifications on your modem. These are the best results I could locate on the Internet: http://www.conexant.com/Product/modems/legacy/soft/CX11256/Pages/default.aspx
    If these specifications are lacking for you, I would contact the manufacturer and inquire about the exact specifications.
    Let me know if you have any other questions or concerns.
    Mario
    I worked on behalf of HP.

  • Save button with PDF form

    When update 1 was installed, a Save button appeared that Saved the form to the drafts folder. We are now on patch 1 and the Save button is gone. There is the possibility that some other change made it go away. I would like to get it back. Any ideas?

    It happens automatically. You don't need any code to trigger it.

  • Replacing a subclip with an After Effects Composition doesn't work properly

    I have a Premiere Project with DV PAL footage. I have gone through my footage and identified all sorts of subclips in my project, and arranged them into bins.  For a few, on the sequence timeline, I want to replace them with After Effects Compositions so I can add some effects.
    If I right-click on a designated subclip (or part of a subclip), and choose "Replace with After Effects Composition", After Effects starts up and I end up with an After Effects project containing 3 items:
    - a composition called "MyProject Linked Comp 1" (duration: length of sub clip, but the comp's layer itself (the next comp) has a duration of zero, so I just see black)
    - another composition called "My Subclip" (duration: length of subclip, starting at beginning of original video footage, not at start of subclip),
    - and then the full original video file also called "My Subclip" (and I mean the full original video file that the subclip points to).  This is full length.
    The linked Composition is therefore viewed as being blank in After Effects, and is returned as such in Premiere Pro.
    What does work properly is if I simply drag a selected clip (in/out) from the Source Monitor in Premiere Pro to the sequence timeline, and then right click and choose  "Replace with After Effects Composition".
    Then I end up with an After Effects project containing:
    - a composition called "MyProject Linked Comp 2" (duration: length of selected clip, and the comp's layer itself (the next comp) has the correct duration, so I see the selected clip!)
    - another composition called "My SourceVideo" (duration: length of full original video, starting at beginning of original video footage, not at start of subclip),
    - and then the full original video file also called "My SourceVideo" (and I mean the full original video file that the selected clip points to).  This is full length.
    In this case the linked Composition is therefore viewed as being the selected clip in After Effects, and is returned as such in Premiere Pro.
    So subclips don't work as I would expect them. I have also tried with a few different video formats. Can anyone else reproduce this behaviour, or even better, find a way to make it work?
    I am running Windows Vista x64 Ultimate, 8GB ram, CS4
    Message was edited by: bobbymacadobe - added system info

    I had the same issue. Created multiple subclips from various parts of a master, mixed subclips on the timeline (all from the same master clip) and when I replace it with an AE comp is send it over with 1 subclip only (eg I had clips for showroom and warehouse, it only send showroom) so any refences to the clips it didn't send were blank!
    So I had to replace all the clips with the master clip (I would like to know if there is a quick way to revert subclips back to master, had to do it manually and it was a pain) and now it is working fine. This doesn't mean subclips don't work; if all the clips are derived from the same subclip it worked for me.

  • How can I replace iCloud contacts with up-to-date contacts on my Macmini?

    Originally I used iCloud when it first was released. My contacts went into the cloud.  I stopped using iCloud and maintained my Contacts on my Macmini. All of my up-to-date information which includes additional contacts and revisions are on the Mac mini.  iCloud wants to work with my old information but I'd rather replace the information on iCloud with the information on my computer.  How can I replace what's in iCloud with my edited and updated information?

    Open Address Book on your Mac, click All Contacts, select a single contact, press Command-A to select them all (they should all be highlightes), then go to File>Export>Export vCard and save this on your desktop.  Then delete all your iCloud contacts by going to icloud.com on your computer, log into your iCloud account and open Contacts, click on All Contacts, to the right click on any single contact to select it, click on the gear-shaped icon at the bottom left and choose Select All, then press the Delete key on your keyboard to delete them all.  Then click on the gear-shaped icon again, choose Import vCard and navigate to the vCard you saved earlier to import your contacts to iCloud.

  • JSF coding with update the data

    hello,
    when i click on update button then my data should be updated in pages like page1, page 2, etc.
    my problem is when i click on update button then immediately(process is not completed) click on next button the page should be shown as exception.but i want 2nd button should be executed with out exception.
    is there any solution to solve exception while press two buttons immidiatly.
    code is: <a4j:commandButton value="#{i18n['update']}" reRender="personalRequestListTableGroup"/>
    <h:panelGroup id="personalRequestListTableGroup">
    <q:dataTable id="personalRequestListTable"
    value="#{PersonalRequestListBean.requests}" var="request"
    styleClass="dataTable"
    sortColumnId="idColumn"
    pageSize="20"
    rolloverRowClass="tableRolloverStyle"
    textStyle="font-family: verdana,Helvetica,sans-serif; font-size: 10pt;"
    allRecordsFilterName="#{i18n['ALL_RECORDS_FILTER_NAME']}"
    emptyRecordsFilterName="#{i18n['EMPTY_RECORDS_FILTER_NAME']}"
    nonEmptyRecordsFilterName="#{i18n['NON_EMPTY_RECORDS_FILTER_NAME']}">
    exception is:
    WARNING: Parameters: Invalid chunk ignored.
    12:03:45,974 [-8888-Processor3] INFO FacesServletWrapper:68 - e instanceof ServletException
    ######### se.getRootCause().printStackTrace() ##############
    java.lang.NullPointerException
    at java.lang.Thread.run(Thread.java:595)
    ######### printStackTrace() finished ##############
    12:03:45,990 [-8888-Processor3] INFO FacesServletWrapper:74 - se.getRootCause().getMessage()=null
    12:03:52,115 [-8888-Processor3] INFO ErrorBean:124 - errorCauseStacktrace.length() < 1
    plz any one reply to my question...wt is prob and where i should change............
    Thanx
    Sridhar

    hello,
    when i click on update button then my data should be updated in pages like page1, page 2, etc.
    my problem is when i click on update button then immediately(process is not completed) click on next button the page should be shown as exception.but i want 2nd button should be executed with out exception.
    is there any solution to solve exception while press two buttons immidiatly.
    code is: <a4j:commandButton value="#{i18n['update']}" reRender="personalRequestListTableGroup"/>
    <h:panelGroup id="personalRequestListTableGroup">
    <q:dataTable id="personalRequestListTable"
    value="#{PersonalRequestListBean.requests}" var="request"
    styleClass="dataTable"
    sortColumnId="idColumn"
    pageSize="20"
    rolloverRowClass="tableRolloverStyle"
    textStyle="font-family: verdana,Helvetica,sans-serif; font-size: 10pt;"
    allRecordsFilterName="#{i18n['ALL_RECORDS_FILTER_NAME']}"
    emptyRecordsFilterName="#{i18n['EMPTY_RECORDS_FILTER_NAME']}"
    nonEmptyRecordsFilterName="#{i18n['NON_EMPTY_RECORDS_FILTER_NAME']}">
    exception is:
    WARNING: Parameters: Invalid chunk ignored.
    12:03:45,974 [-8888-Processor3] INFO FacesServletWrapper:68 - e instanceof ServletException
    ######### se.getRootCause().printStackTrace() ##############
    java.lang.NullPointerException
    at java.lang.Thread.run(Thread.java:595)
    ######### printStackTrace() finished ##############
    12:03:45,990 [-8888-Processor3] INFO FacesServletWrapper:74 - se.getRootCause().getMessage()=null
    12:03:52,115 [-8888-Processor3] INFO ErrorBean:124 - errorCauseStacktrace.length() < 1
    plz any one reply to my question...wt is prob and where i should change............
    Thanx
    Sridhar

  • Service doesn't update after data model updating

    Hello, dear experts!
    I have a question.
    I created OData Service and all is OK.
    After that I have updated data model. MPC methods have been changed with my new updates. But I can't see new service metadata document, browser displays old version of it. And service works in the way like old version of data model is actual.
    I don’t understand this behavior.
    In the book “OData and SAP NetWeaver Gateway” I have read that it is not “waterfall” approach in Gateway, which means that we can make changes in all 3 service creation phases (data model definition, service implementation and service maintenance) in the order we want.
    I tried regenerate runtime objects and reactivate service, clear browser cache, but it didn’t help.
    I put external breakpoint into DEFINE method of the MPC class and send some requests to server, but debugger doesn’t open. It looks like some kind of server cache.
    I think it is incorrect behavior. What would you recommend?
    Thanks in advance,
    Ihar

    This feature is available from SP7
    Go the the link below and search for "Reloads the service metadata for the annotation models."
    Activate and Maintain Services - SAP NetWeaver Gateway - SAP Library

  • Hierarchy not Updated after Data Load

    Hello All,
    I'm using extractor 0MATERIAL_CDTH_CMHIER  to load a hierachy into 0MATERIAL (BW 7.0).
    The problem is that when there are changes in nodes of the hierarchy, it´s not being updated by this data load (eventhough the new records are loaded into PSA). I need to delete and recreate the hiearchy to be able to see the new nodes.
    Any idea on what could be the cause of this issue?
    Thanks in advance,
    Cristina.

    Hi Cristina,
    If you are using a process chain to load the hierarchy, check if you are using a "Save hierarchy" process after the InfoPackage run and before the "Change run" process.
    You can find more detailed information at:
    http://help.sap.com/saphelp_nw04/helpdata/en/3d/320e3d89195c59e10000000a114084/content.htm
    I hope it helps you.
    Regards,
    Maximiliano

  • Replace NULL value with any other data block value

    Hi,
    I have forms 10g, after query of record on a form I want to replace certain column values if they found Null with any other datablock values I have tried NVL(column_name, :block.column_name) but it give error that no object reference found.
    Thanks and Regards, Khawar

    Hi,
    This is the SQL statement issued by Forms
    SELECT RD.REGION_NAME,GL.GRID_CODE,G.GRID_NAME,GL.R_DATE,NVL(GL.R_TIME, :PARAMETER.R_TIME),GL.LOAD_MW,GL1.LOAD_MW,GL.LOAD_MVAR,GL.LOAD_SHED_MW,GL.TEMPRATURE,GL.HUMIDITY,GL.FORECAST_FACTOR FROM grid G, grid_load gl, region_district rd, grid_load gl1 WHERE gl.grid_code = gl1.grid_code(+) and gl.r_time = gl1.r_time(+) and g.grid_code = gl.grid_code(+) and to_date(to_char(gl.r_date(+),'dd/mm/yyyy'),'dd/mm/yyyy') = to_date(to_char(:1,'dd/mm/yyyy'),'dd/mm/yyyy') and to_date(to_char(gl1.r_date(+),'dd/mm/yyyy'),'dd/mm/yyyy') =to_date(to_char(gl.r_date,'dd/mm/yyyy'),'dd/mm/yyyy') - 1 and to_number(gl.r_time(+)) = to_number(:2) and g.grid_code not in ('KBR','BR2') and g.DISTRICT_CODE=RD.DISTRICT_CODE order by rd.Region_name, g.GRID_NAME
    I have tried to update those column with other value by checking there Null status in Post-Query trigger but it raises error SQL command not properly ended ORA-00933.
    Thanks and Regards, Khawar

  • Solved af:table is not refreshed with updated MBean data from list even

    Hi,
    I have a af:table which gets its data from a Managed Bean List type varaiable.
    My table hav one lov as a row item.
    When i change the lov in each row... a new row should get added to the table.
    So in the value change listener of the selectOneChoice i added one element to the list.
    Enabled PPR on table.
    But table is not getting refreshed until i click on some button or link.
    Thanks
    Murali
    Message was edited by:
    Murali Chepuri

    Solved after adding partialtarget in ValueChangeListener.
    Thanks
    Murali

  • Any way to have Mail save attachments with proper creation dates?

    Whenever I save attachments from Mail they end up with both creation and modification dates that are the time that I saved them out of Mail. I would rather have it be the original dates of the file (if possible) or at the very least the date the email was received. Any way to do this?

    Thank you Mulder...
    So there doesn't appear to be any way to have saved attachments have the correct date...
    Do you (or anyone else) have a favorite utility for quickly setting creation and mod dates for files in OS X? That way I can save the files and then edit them by hand if necessary.

Maybe you are looking for

  • Using MM drivers

    Hi, Product:           Java Web Application Operating system:     Linux (Redhat 7.3) Web Server:          Apache Application server:     Tomcat 4.0.4 Database server:     MySQL 3.23.49 Java Architecture:     JSP (presentation) + Java Bean (Business l

  • Printing PDF to RightFax v10.0 printer driver

    Can no print a PDF using RightFax v10.0 printer driver after upgrading to Reader v11.0.6.

  • App using Location Services

    I am having a problem with my iPad Mini Retina NOT using location services in my local weather app.  I have 2 iPads, the mini and an iPad 4 and the 4 uses location services just fine.  I have checked all the settings and they are exactly the same on

  • IOS Security Msg On AIR 3.7

    Hi, I am using the new 3.7 SDK with my mobile Flex application, and have a situation where my externally loaded swf is generating mysterious messages in the debugger console. The mobile app downloads and caches swf files from a server, then loads the

  • SWF animation issue in Captivate CS4

    Hello All... Okay, I have been working on this for hours, and I am getting pretty frustrated. I have an swf animation that I need to insert into Adobe Captivate CS4 slide. I have thested the swf file and it opens and plays just fine. I am able to ins