Page 1 of 1

form navigation: list->record->record

PostPosted: Wed Aug 06, 2003 3:46 am
by Neale
I'm getting lost here :-(

Starting with a list view form, showing a foundset, I need to be able to navigate from that list view form to a record view form and from there to a different record view (but displaying the same record). I've got things "working", but I'm far from convinced that what I'm doing is correct/best...

First, conceptually, when I navigate from the list view to the first record view (via a button which is part of each record displayed in the list form) should I retain the current foundset as-is or does/should the foundset reduce to just the selected record?

Assuming the latter, is it correct/best to relate the table to itself and use showRecords(relation_to_self) to navigate from the list to the record view?

Alternatively, what would be the correct/best way if it's appropriate to NOT mess with the current foundset - just a show() or precede the show() with a loadRecords(Object) or what? BTW, what is valid for "Object" in loadRecords(Object)?

Similarly, what would then be the correct/best way of navigating from that record view to a different record view?

Thanks,
Neale.

PostPosted: Wed Aug 06, 2003 12:01 pm
by Jan Blok
Some facts:
-a foundset has a selected record
-listview show all records highlighting the selected, recordview only shows selected record

So it is possible to retain current foundset as is, in the listview_form make a method with: forms.recordview_form.controller.showRecords(foundset) this takes the foundset from the listview_form and puts the records in the recordview_form showing the selected record.

but forms based on the same table share the same foundset (unless useSeparateFoundset property is used) so the the recordview_form had already the foundset (assuming you did not use the property) so forms.recordview_form.controller.show() whould be sufficient

Only when you want to make sure the recordview_form contains 1 record a selfjoin is needed i.e. forms.recordview_form.controller.showRecords(relation_to_self)

PostPosted: Fri Aug 08, 2003 7:10 am
by Neale
Thanks for the clarification.

Regards,
Neale.