Using DynaSiteObjects to store global objects

The DynaSiteObjects class has fields to store objects used upon site startup to render forms, fields, etc. It also has a statusMap HashMap that may be used to store objects that your application may need on a global level. Here is an example using statusMap to track expired stock:

if (DynaSiteObjects.getStatusMap().get("expiredStockItems") != null) {
      expiredStockItems = (List) DynaSiteObjects.getStatusMap().get("expiredStockItems");
}