I have a wizard created with master/detail records. On the first page of the wizard, the user enters details for the newly created master record. On the next page of the wizard, the detail group is shown as a table. When this wizard page is displayed I need the detail table to be pre-populated with a number of rows. In each row I need one of the attributes displayed to be populated from a static list
1. First train stop : New Patient
2. Second stop : Table of patient medical history, populated with 5 rows - the first column of each row populated with values ('ValueA','ValueB','ValueC' etc...)
How should I go about doing this ?
Do I override the PatientRowImpl class and create the detail records in there ? Do I create a new method in the AM to get the current patient record, create the details records and then use the taskflow to run the method before the second train stop loads ? Or backing bean method that executes appropriate "CreateXXX" operation binding and wire that method into wizard flow ?
Brilliant, that worked a treat thanks :)
One more question on topic, what is the best way to approach this to be able to create new detail records for an existing parent ? So for new parent/new child I created my child rows in the parent EO create method.
I am also using the wizard layout to edit existing parent records. On one of the train stops, I need new child records created and attached to the existing parent record. The user needs to update the details records during the transaction so I can't simply create the child records in the parent doDML method after the user has saved the transaction.
If they always update some fixed attribute in the existing parent row, you could implement it in this setAttribute method.
If not, you need to create an AM method that creates the child rows, and then either call this method using a method activity in the taskflow, or using the invokeAction executable in the page def.