Instead of having two tables, I have one drop down menu, and a detailed table. Based on the user selection, I need to set values in the detailed table. How do I access the detailed table rows to set values in the fields?
In the model layer, define a view link between the master and the child table and use this view link to create view object instances as below:
Create drop down menu using the MASTER view object instance. When the user selects/clicks the drop menu, in the value change/action listener - set the current row for the MASTER table.
Once the current row is set, the child view object instance will automatically refresh to have the corresponding rows for the master.
You did NOT do it - just setting the current row in the master would refresh the child rows (as you have a view link between them).
BTW, what is the exact component that you are using to build the drop down menu for the MASTER?
I am using a choice list for the user to make a selection. Based on the choice list, it will display the correct child table. For each row in the child table, I need to do a calculation, and reinsert the new view back into each row in the child table.
I have created a sample application based on your use-case with Departments & Employees as Master & Child respectively.
I just looked at the example. For example, in your example app you have a column called ComissionPct. How would do an automatic calculation for every row in the CommissionPct column? An example calculation can be that ComissionPct = Salary * .3. or ComissionPct = (Salary * .5)/12.
Just like an excel spreadsheet where you can enter formulas to have calculated fields.
Edited by: John on Apr 30, 2012 5:46 PM