To send infopad updates to the servlet, you may update values from infopads in a granularity of a single slot, or an infopad cell. Updates are grouped together into a Vector for performance reasons, even if you only want to update the values from one infopad cell or slot, then for each update you want to send, encapsulate it in a Hashtable. The name of the infopad you want to update is stored with the key "Tablename" and the value is the actual name of the infopad. The row you want to update is stored with the key "Row" and the value is either the row name or the row number. The column you want to update is stored with the key "Column" and the value is either the column name or the column number. The slot whose value you want to return should be packaged with the slot name as the key and the updated value as the value. Only those slots that you want updated, should be placed into the Hashtable. Once you have packaged your updates, you may open a connection to the servlet, and send the Vector.
You can send the update request to the following URL:
Note: Remember to append the registration string to the URL.
The following example shows how the "&" is used to connect the registrationString to the URL. The variable registrationString contains the sessionID inserted into one of the applet’s parameter tags. You can then use the getParameter ("") method to get the actual value, passing it the name of the parameter containing the sessionID.
The following is an example of how to use the updateInfopad service:
Vector updates = new Vector();
for (int i=1;i<6;i++)
for (int j=1;j<6;j++)
Hashtable firstupdate = new Hashtable();