IShowPropertiesCmd::Initialize

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);
Parameters
bstrPageTitle - [in] Required _bstr_t, which specifies the label to display in the title bar of the Properties JSP page when the ShowProperties command is invoked. By using this parameter, client applications can customize the title that appears at the top of the JSP page to correspond with their application requirements.
pIObjectStoreItem - [in] Required pointer to an IObjectStoreItem interface, in which the version series ID (GUID) for the reservation object for the object for which to display the properties, is specified in the bstrVersionID parameter.
Results
This method always returns an HRESULT value of S_OK if successful.
Sample
The following is a fragment from the complete example for the ShowProperties command.
   ...
   // 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);
...