Full Name: | herschel.ia.pal.ListContext |
Type: | Java Class -
![]() |
Import: | from herschel.ia.pal import ListContext |
Category |
Groups products (or other Contexts that in turn group products) in a list-like structure.
Products grouped in a ListContext can be subsequently retrieved by an index (with index=0 corresponding to the first product in the list), through the 'refs' method. Note: users may be confused as to why there is a need to have to go though a 'refs' method to add or access products from a ListContext. This is due to a technical limitation in the design which will be addressed in due course.
Example 1: Adding a product to a ListContext | ||
---|---|---|
|
Example 2: Getting the first product from a ListContext | ||
---|---|---|
|
Example 3: Saving a ListContext to ProductStorage (same way as any other product) | ||
---|---|---|
|
Method | |
---|---|
List
getRefs
|
|
get the list of ProductRefs stored. From this list, you can put |
List
getRefs
|
|||
---|---|---|---|
get the list of ProductRefs stored. From this list, you can put products into the ListContext, or retrieve products by index. |
|||
Return | |||
List
A list of product refs. |
|||
Examples | |||
Putting a product into the the ListContext | |||
|
|||
Getting the first product from the ListContext | |||
|