IC5Notice: We have upgraded developerWorks Community to the latest version of IBM Connections. For more information, read our upgrade FAQ.
Topic
  • 4 replies
  • Latest Post - ‏2010-02-10T21:14:21Z by SystemAdmin
SystemAdmin
SystemAdmin
334 Posts

Pinned topic Inline Edit - Problem saving to database

‏2008-03-17T10:15:49Z |
Hi,

I need urgent help on Inline Edit saving functionality.

I have a table displaying the data from database. I used DOJO Inline Edit functionality to edit one particular column of the table. When this column is edited, I would like to save the changes in the database. To implement this functionality, I did following.

  • I have selected "Submit Form" in Dojo Inline Edit.
  • In the Service Provider, I have created a SQL and service operation to update that particular column in database.
  • In the Service Consumer, I have created a action which calls the above SQL and attached this action to DoJo Edit.
  • My problem is how to pass parmeters from edited row in the Dojo Inline Edit Table to SQL. I don't know if this is right way of doing but I did the following assignment in the Action attached to Dojo Inline Edit.

Assignment!DataServices/CoverageServiceConsumer/updateCoverageRecord/inputs/updateCoverageRecordSQLInputs/Parameter1Value=${Variables/CoveragePage_SelectedRowD ata/Row/COV_TER_ID}

Assignment!DataServices/CoverageServiceConsumer/updateCoverageRecord/inputs/updateCoverageRecordSQLInputs/Parameter2Value=${Variables/CoveragePage_SelectedRowD ata/Row/COV_ID}

DataServices/CoverageServiceConsumer/updateCoverageRecord

Please advise if this the correct way of doing of it or any oter alternatives. Thanks.
Updated on 2010-02-10T21:14:21Z at 2010-02-10T21:14:21Z by SystemAdmin
  • IndiaTech
    IndiaTech
    2 Posts

    Re: Inline Edit - Problem saving to database

    ‏2010-02-10T11:48:57Z  
    I am also facing same problem & also done the same steps.
    but I don't understand how onclick event generated on User interface will save into database.

    I will be very greatful, for your's input.

    Thanks in advance
  • SystemAdmin
    SystemAdmin
    334 Posts

    Re: Inline Edit - Problem saving to database

    ‏2010-02-10T13:36:56Z  
    When a submit is done using the inline edit (which just used Page Automation) all of the fields in the table are submitted, so there is no selected row. Typically what you do is pass an argument to your target action that contains the row number of the field that has changed (e.g. ${Variables/RowCounterVar}). You can then use this row counter to index into the data to find what has changed. Then you can copy the changed fields into the inputs of Data Service used to do the update. This gets a bit more complicated if you are using paging on the view in which case you will have to look in the submitted inputs for the modified data.
    Tom
  • IndiaTech
    IndiaTech
    2 Posts

    Re: Inline Edit - Problem saving to database

    ‏2010-02-10T14:33:31Z  
    When a submit is done using the inline edit (which just used Page Automation) all of the fields in the table are submitted, so there is no selected row. Typically what you do is pass an argument to your target action that contains the row number of the field that has changed (e.g. ${Variables/RowCounterVar}). You can then use this row counter to index into the data to find what has changed. Then you can copy the changed fields into the inputs of Data Service used to do the update. This gets a bit more complicated if you are using paging on the view in which case you will have to look in the submitted inputs for the modified data.
    Tom
    Thanks Tom for u r quick response!

    I have tried what u have told ...but still nothing updated in database.
  • SystemAdmin
    SystemAdmin
    334 Posts

    Re: Inline Edit - Problem saving to database

    ‏2010-02-10T21:14:21Z  
    • IndiaTech
    • ‏2010-02-10T14:33:31Z
    Thanks Tom for u r quick response!

    I have tried what u have told ...but still nothing updated in database.
    I would try to narrow down your problem by adding some debug information to your code. Check to see if your are getting the proper input values in the submit form action, and then work your way back to the database.
    Tom