Databases Reference
In-Depth Information
'APPLICATION PROCESS=update emp coll member',0);
get.add('T COL VAL ITEM',pThis);
get.add('T COL SEQ ITEM',SeqID);
get.add('T COL ATTR ITEM',pAttribNo);
gReturn = get.get();
if(gReturn) {alert(gReturn)}
get = null;
}
</script>
The code to implement the On-Demand Process update emp coll member will be a simple PL/SQL
block:
BEGIN
tab form emp pkg.update emp coll member (:t col seq item,
:t col attr item,
:t col val item);
END;
The last thing you need to do is to call this code from the Tabular Form. You do that by entering
code similar to the following for each column on the form. Place the code in the Element Attributes field
under Column Properties. Following is the code for the ENAME column:
onchange="f update emp coll member(this.value,'#ROWNUM#',2);"
The third parameter of the JavaScript function is the attribute number of the column in question.
Take care to adjust that value to the right one for each column on the form. The mapping in the view
code (Listing 3-9) can help you do that.
Now run page 3 and try to update some of the rows in the Tabular Form, as shown in Figure 3-31.
Figure 3-31. Updating rows on the tabular form
You can also activate Firebug and watch what happens at the browser level, as shown in Figure 3-32.
Activate Firebug and switch to the console tab. After updating a column, you should see the process
running in Firebug. Opening that process will display more detail.
Search WWH ::




Custom Search