class %ZEN.Template.WebFormWizard.Home
extends %ZEN.Template.WebFormWizard.Template
Studio Template.
Create CSP forms for Cache classes.
This is a Zen Page class.
parameter DOMAIN = "%ZEN";
Domain used for localization.
parameter HELPID = "GSTD_CreateWeb";
DOCBOOK Topic Id that offers help for this template.
parameter PAGETITLE = "Web Form Wizard";
Display title of this page
parameter TEMPLATEDESCRIPTION = "Create a CSP form for a Cache class.";
Short description of the template to show in Studio.
If DOMAIN is defined this will be localized.
parameter TEMPLATEMODE = "template";
What type of template.
parameter TEMPLATENAME = "Web Form Wizard";
Name of the template to show in Studio.
If DOMAIN is defined this will be localized.
parameter TEMPLATETITLE = "Web Form Wizard";
Title of the template to show in the template window.
parameter TEMPLATETYPE = "cls,csp";
Comma separated list of 'CSP', 'CSR', 'MAC', 'INT', 'INC',
'BAS', 'CLS' to say what type of code this template
generates; CSP, CSR, Routine, or Class code.
You can also specify '*' for all types.
method %GetDescHTML(pSeed As %String)
as %Status
Provide contents of description component for tab1.
method %GetDescHTML2(pSeed As %String)
as %Status
Provide contents of description component for tab2.
method %GetDescHTML3(pSeed As %String)
as %Status
Provide contents of description component for tab3.
method %OnAfterCreatePage()
as %Status
This callback is called after the server-side page
object and all of its children are created.
Subclasses can override this to add, remove, or modify
items within the page object model, or to provide values
for controls.
method %OnTemplateAction()
as %Status
This method is called when the template is complete. Any
output to the principal device is returned to the Studio.
method ConvertKeyNameToIntName(Key)
as %String
*************************************************************** ///
* The following methods are for generating code for a form. * ///
*************************************************************** ///
Check for JavaScript name identifiers. If invalid characters
(including foreign language) exist in a property name,
then that property name will not be used in the field name
on the new generated form. Instead, a "fieldNN" name will be used
where NN is the unique "findex" number.
method GetOptionsList(Layout)
as %String
Build option list based on user's Settings
method GetParameterList(clsName, sIntName)
This module is called to heck if ValueList and DisplayList exist. If yes, build SELECT box.
method GetSearchList(sId, clsName)
as %String
Loop through the selected properties. Add to search list if the property is searchable
classmethod PopulateAttributeList(pRoot As %String, Output pTree, ByRef pParms)
as %Status
Load fields into Available/Selected list boxes.
ClassMethod PopulateAttributeList(NAMESPACE, FullClassName, sId) As %Boolean [ ZenMethod ]
classmethod PopulateClassList(pRoot As %String, Output pTree, ByRef pParms)
as %Status
Build tree for class names
classmethod PopulateQueryList(sId, sName)
as %String
[ ZenMethod ]
User wants to create Drop-down for refclass. Return Query Name choices.
classmethod PopulateRefPropList(sId, sName)
as %String
[ ZenMethod ]
User wants to show reference as Pull-down menu and has selected a Query Name.
Return Query Column choices.
classmethod PopulateRefQueryColumn(sId, sName)
as %String
[ ZenMethod ]
User wants to show reference as Search button or Hyperlink.
Return Query Column choices.
classmethod SaveAttribute(sId, sName, sField, sValue)
[ ZenMethod ]
classmethod SavePropList(sId, sValue)
as %Boolean
[ ZenMethod ]
Save the selected property list into %session for processing
classmethod ShowRef(sName)
as %ZEN.proxyObject
[ ZenMethod ]
Given property name, decide now what type of attribute we should show.
idAttr1 = show reference
idAttr2 = show collection or multiline
idAttr3 = show image
idAttr4 = show Pull-down menu for reference
method WriteConField(clsName, sId, sName, Layout, gsAlign, sBold1, sBold2)
Write out HTML code: Write out code for individual field
method WriteFields(sId, clsName, Layout, bReq)
Write out HTML code: Loop through all selected fields
Set indicator (bReq) for whether there is at least one required field for footer.
method WriteFormFooter(clsName, Layout, bReq)
Write out HTML code: form footer and finish
method WriteFormHeader(sId, clsName, Layout)
Write out HTML code for form header
method WriteJS(sId, clsName, Layout)
Write out Javascript code for page
method arrowClicked()
[ Language = javascript ]
User clicked one of the arrows or double clicked.
method canFinish()
[ Language = javascript ]
Return true if this template can Finish (i.e., enable
the Finish button).
This is implemented by subclasses.
method canGoBack()
[ Language = javascript ]
Return true if this template can go to the previous page (i.e., enable
the Back button).
This is implemented by subclasses.
method canGoNext()
[ Language = javascript ]
Return true if this template can go to the next page (i.e., enable
the Next button).
method formValidationHandler()
[ Language = javascript ]
Validation handler for form built-into template.
method getClassName()
[ Language = javascript ]
Return currently selected package and classname
method hasMultiplePages()
[ Language = javascript ]
Return true if this template has more than one "page".
This will display Back and Next buttons.
This is implemented by subclasses.
method loadFields()
[ Language = javascript ]
Load selected properties into fields box on tab3
method loadProperties()
[ Language = javascript ]
Load properties for selected table
method locationChange(ctrl)
[ Language = javascript ]
This is called when the user changes the Location control(s).
method lstFieldsClick(ctrl)
[ Language = javascript ]
User clicked a selected property in lstFields on tab3.
Fill in caption and determine if the reference radiobuttons should be shown.
method lstQueryColumnClick(ctrl)
[ Language = javascript ]
User selected a Query Column for reference class.
Save the selection and enable fields.
method lstQueryNameClick(ctrl)
[ Language = javascript ]
User selected a Query Name for reference class.
Save the selection and load the Query Columns field.
method moveBack()
[ Language = javascript ]
Move item from listbox to tree
method moveBackAll()
[ Language = javascript ]
Move item from listbox to tree
method moveTo()
[ Language = javascript ]
Move item from tree to listbox
method moveToAll()
[ Language = javascript ]
Select the entire list from tree to the list, marking tree item style as selected
method moveUpDown(flag)
[ Language = javascript ]
Moving item in a listbox up and down
method nextPage()
[ Language = javascript ]
Go to the next page of the template (if there is one).
This is implemented by subclasses.
method onstartHandler()
[ Language = javascript ]
This is called when the template is first displayed;
This provides a chance to set focus etc.
method previousPage()
[ Language = javascript ]
Go to the previous page of the template (if there is one).
This is implemented by subclasses.
method treeClick(gonext)
[ Language = javascript ]
User clicked an item in the tree
method updateAttribute(ctrl)
[ Language = javascript ]
User changed an attribute field. Save it to temp array.