how to add update button to update data into table..?

1
0
-1

i am new in Bonita can anyone help me to add button in the form and to update form data into existing data into table. how can i do that.

Comments

Submitted by julien.mege on Wed, 02/03/2021 - 10:39

hello,

could you give us more information about your use case:

- You want to add a button into a UI Designer form to refresh the content of a table? What does this table is supposed to display?

Submitted by VSB2207 on Wed, 02/03/2021 - 14:19

yeah i want to add a button on form for which should perform CURD operation like i i select a table row and click the delete button then that row should get deleted and i want to know the step to do that, after that i will be able to perform other CURD operation on the table database.

1 answer

1
0
-1

Hello,

I made you a basic example of a page that can list your Bonita applications, delete the selected one, then refresh the list:

  1. So first in the white board drag and drop:

    - a DATA TABLE widget

    - and a BUTTON widget

  2. Then create the 4 following variables:
    - refreshTimeStamp : Type = Javascript expression , value = "return function(){ $data.timeStamp = Date.now(); };"
    - timeStamp : Type = String
    - selectedAppId : Type = String
    - urlParam : Type = Javascript expression , value = "return {"timestamp": $data.timeStamp};"
  3. Then the configuration of the DATA TABLE should be:
    - Headers = Id, displayName
    - Data source = Bonita API
    - URL = ../API/living/application
    - API request parameters = urlParam (as a variable, need to click on the fx button)
    - Columns key = id, displayName
  4. and finally, the configuration of the delete button :
    - Label = Delete selected App
    - Action = DELETE
    - URL to call = ../API/living/application/{{selectedApp.id}}
    - Target URL on success = {{refreshTimeStamp()}}


    and normally, this should work. You suppose to be able to list the current applications in the table, and then if you select a line and click the delete button:
  • it will call the delete request
  • update the timestamp on success
  • as the application list URL depends on the Timestamp, the list will be refreshed

Hope this will help you,

let me know if everything is ok.

Julien

Comments

Submitted by VSB2207 on Thu, 02/04/2021 - 13:16

I tried the same. i haven't got it can you share you email or skype.

so that i can contact you seamlessly and i can share you my screenshot so that you can get what i actually want ... please .

Submitted by julien.mege on Thu, 02/04/2021 - 15:10

It is better if we can solve this here, to make it available for the rest of the community.

Could you share your actual page on a public drive, to allows me to see your example?also which version of Bonita are you using ?

Submitted by VSB2207 on Fri, 02/05/2021 - 13:02

https://drive.google.com/file/d/1Afj4GTktklgUooeqT3_uwPSrp0tnmH_D/view?u...

hii,

above link is of my drive where i have share what i want actually i want those button to work accordingly as there label.

button are at the top right corner. i am using the latest version of bonitasoft i started working with bonita in last 3 week only. thats why i am not getting it.

view?usp=sharing

Notifications