The Initialize method customizes the Properties Java™Server Pages (JSP) page in preparation for use by the ShowProperties operation, including specifying the object store item for which to display the properties, as well as the title for the page.
void spIShowPropertiesCmd->Initialize(_bstr_t bstrPageTitle, IObjectStoreItemPtr pIObjectStoreItem);
... // Instantiate the ObjectStoreItem component IObjectStoreItemPtr pIObjectStoreItem; hResult = spIObjectStoreItem.CreateInstance(__uuidof(ObjectStoreItem));
if (FAILED(hResult)) {
std::cout << "Could not create the ObjectStoreItem component.\n"; _ASSERTE(0);
} // Initialize the ObjectStoreItem component with // the items' type, object store name, version series ID and item ID ItemType enItemType = eItemTypeDocument; _bstr_t bstrObjectStoreName = (_T("Alaska")); _bstr_t bstrVersionSeriesID = (_T("{6BC064A2-2D58-4B0A-AEF2-B2F8A1100000}")); _bstr_t bstrItemID = (_T("{DDE54469-36D9-4fe9-8676-445E4994DE1F}")); std::cout << "Initializing the ObjectStoreItem component..." << std::endl;
spIObjectStoreItem->Initialize(enItemType, bstrObjectStoreName, bstrVersionSeriesID, bstrItemID); // Instantiate the custom ShowProperties command component IShowPropertiesCmdPtr spIShowPropertiesCmd;
hResult = spIShowPropertiesCmd.CreateInstance(__uuidof(ShowPropertiesCmd));
if (FAILED(hResult)) {
std::cout << "Could not create the ShowProperties command component.\n"; _ASSERTE(0);
} // Initialize the custom ShowProperties command component with the // page title and object store item. _bstr_t bstrPageTitle = (_T("Customized Show Properties Operation")); std::cout << "Initializing the ShowProperties command component..." << std::endl; spIShowPropertiesCmd->Initialize(bstrPageTitle, spIObjectStoreItem);...