The procedural way of loading an SDT (like the one needed in the TabbedView Web Component) is:
Event Start
...
&Tabs = new()
&TabsItem = new()
&TabsItem.Code = 'General'
&TabsItem.Description = 'General info'
&TabsItem.Link = link(ViewCustomer, CustomerId, 'General'
&TabsItem.WebComponent = create(CustomerGeneral, CustomerId)
&Tabs.add(&TabsItem)
&TabsItem = new()
&TabsItem.Code = 'Invoices'
&TabsItem.Description = 'Invoices'
&TabsItem.Link = link(ViewCustomer, CustomerId, 'Invoices'
&TabsItem.WebComponent = create(CustomerInvoices, CustomerId)
&Tabs.add(&TabsItem)
...
TabWC.Object = Create(TabbedView, &Tabs)
EndEvent
Using Data Providers, the declarative way is:
LoadCustomerTabs
TabOptions
{
TabOptionsItem
{
Code = "General"
Description = "General Info"
Link = link(ViewCustomer, CustomerId, 'General')
WebComponent = link(General, CustomerId)
}
TabOptionsItem
{
Code = "Invoices"
Description = "Invoices Info"
Link = link(ViewCustomer, CustomerId, 'General')
WebComponent = link(Invoices, CustomerId)
}
TabOptionsItem
{
Code = "Payment"
Description = "Payment Info"
Link = link(ViewCustomer, CustomerId, 'General')
WebComponent = link(Payments, CustomerId)
}
}
So the Event Start becomes:
Event Start
&Tabs = LoadCustomerTabs()
TabWC.Object = Create(TabbedView, &Tabs)
Endevent