how to add update button to update data into table..?
Hello,
I made you a basic example of a page that can list your Bonita applications, delete the selected one, then refresh the list:
- So first in the white board drag and drop:
- a DATA TABLE widget
- and a BUTTON widget
- 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};"
- 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
- 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
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 .
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.
Comments
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?
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.