ISelectEntryTemplateCmd::Initialize

The Initialize method customizes the Select Entry Template Java™Server Pages (JSP) page in preparation for use by the SelectEntryTemplate operation, including filtering the list of available entry templates by object store name and template type, as well as specifying the page title.

void spISelectEntryTemplateCmd->Initialize(_bstr_t bstrPageTitle,
                                           _bstr_t bstrObjectStoreName,
                                           TemplateType enTemplateTypes);
Parameters
bstrPageTitle - [in] Required _bstr_t, which specifies the label to display in the title bar of the Select Entry Template JSP page when the SelectEntryTemplate command is invoked. By using this parameter, client applications can customize the title that appears at the top of the page to correspond with their application requirements.
bstrObjectStoreName - [in] Required _bstr_t, which specifies the name of the object store where the entry templates are located.
enTemplateTypes - [in] Required TemplateType enumeration, that specifies the type of entry templates that should be listed, which can be set to the following:
- eTemplateTypeDocument, to only list entry templates for documents.
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 SelectEntryTemplate command.
   ...
   // Instantiate the custom SelectEntryTemplate command component
   ISelectEntryTemplateCmdPtr spISelectEntryTemplateCmd;
hResult = spISelectEntryTemplateCmd.CreateInstance(__uuidof(SelectEntryTemplateCmd));
if (FAILED(hResult)) {
std::cout << "Could not create the SelectEntryTemplate command component.\n"; _ASSERTE(0);
} // Initialize the custom SelectEntryTemplate command component with the // page title, object store name, and template type(s). _bstr_t bstrPageTitle = (_T("Customized Select Entry Template Operation")); _bstr_t bstrObjectStoreName = (_T("Alaska")); TemplateType enTemplateTypes = eTemplateTypeDocument; std::cout << "Initializing the SelectEntryTemplate command component..." << std::endl; spISelectEntryTemplateCmd->Initialize(bstrPageTitle, bstrObjectStoreName, enTemplateTypes); // Execute the SelectEntryTemplate command and capture the response component std::cout << "Executing the SelectEntryTemplate command..." << std::endl; IAppIntCmdPtr spIAppIntCmd(spISelectEntryTemplateCmd);
IAppIntRspPtr spIAppIntRsp = spIAppIntCmd->Invoke(spIAppIntSession);
...