Update table using AJAX

Update table using AJAX

  
I created a couple of tables (state and site). State has .Id (unique) and Site has .StateId (not unique). This allows me to have many sites in a particular state (so far no big deal). I created web screen that allows me to pick a state and display all the sites for that state (by dragging the site date table onto the form. When I enter the form passing the state I get all the correct sites.

On the form, I created a <select> object. I can update individual labels, but not the table.
Hi,

can you provide the oml please.

what am thinking about what could be an issue:
- in the refresh-action do you read out the select-widget and refresh the query and re-assigning it to the table?
- do you want the table to be refreshed by a button or via the onchange of the select?
Statler & Waldorf wrote:
Hi,

can you provide the oml please.

what am thinking about what could be an issue:
- in the refresh-action do you read out the select-widget and refresh the query and re-assigning it to the table?
- do you want the table to be refreshed by a button or via the onchange of the select?
 I'm not sure what "oml" means.  I want the table to refresh when a user changes the value in the <select> (i.e. onChange).  I think I'm getting the new value (I was able to use a feedbackMessage box to display the ID of the <select> item.  I think I have two issues 1) which widget do I use in the onChange action (i.e. ajax refresh or refresh query) and 2) the parameter(s) I need to pass. 
Randy Weeton wrote:
 I'm not sure what "oml" means.  I want the table to refresh when a user changes the value in the <select> (i.e. onChange).  I think I'm getting the new value (I was able to use a feedbackMessage box to display the ID of the <select> item.  I think I have two issues 1) which widget do I use in the onChange action (i.e. ajax refresh or refresh query) and 2) the parameter(s) I need to pass. 
 
oml (Stands for: OutSystems Markup Language) format and with .oml extension.
Basically is the outsystems file format that you open in Service Studio and contains your eSpace.
Gonçalo Martins wrote:
 
oml (Stands for: OutSystems Markup Language) format and with .oml extension.
Basically is the outsystems file format that you open in Service Studio and contains your eSpace.
 
 Here's my OML...
I finally figured this out myself.  I'm posting this for others who can't find any information on some of the most obvious things.

It turns out that I needed both the "Refresh Query" and the "AJAX Refresh".  Now that I know this it is obvious, but I couldn't find any instructions (or even hints).

Statler & Waldorf,  gave a "sort of answer", but didn't use the the terms/objects in Services Studio so it wasn't obvious from his reply as to what I was supppse to do.
Randy, two small tips concerning ListTables.

Whenever you need to remove a single record from the list you can:
1.
Create a button in the table
Label it "delete" and then right click; version 6.0 and higher will provide you with the option to create the delete for you. (like magic)

2.
You can also combine a delete command with a System action called ListRemove.
The list remove rules out the need to refresh the whole table; causing a delete action to respond very quicky.
This video introduces the idea presented by Eric. Where use of ajax to refresh the table with the remove list.

http://www.youtube.com/watch?v=coYLmSDo5XU&list=PLWdAXdMaLBi3Qv8KJ9yxpnoPvlJbDlaDR

Best Regards,
Luís Teixeira