Provides template related services to the base template class, jsx3.gui.Template.Block. See the compile method for usage details.
Adds a resolver library. A resolver library is a collection of one or more resolvers. Libraries allow resolvers belonging to different sets
to be organized into a related group. This simplifies how resolvers are grouped and used as they are shared among classes. Note that
a library is automatically created for each class that uses the template engine. For example, if a GUI class named my.Example is
compiled by the template, a library will be created named my.Example. Any other GUI class can now use every resolver made
available to my.Example, by importing this named library.
Parameters:
strLibraryId – The ID for this library.
arrLibrary – An array of objects. Each object has the named properties: id, setid (optional if id is prefixed with a $).
Adds a resolver to a given resolver set.
Parameters:
strSetId – If not provided, the global resolver ID will be used: jsx3.gui.Template
strResolverId – Unique ID for the resolver among all resolvers in this set
objResolver – function handler. The resolver always executes in context of the instance being painted
META –
Extended configuration object with named properties:
- type (css (default)| attribute | event | box)
- repaintupdate (true | false (default))
- name (the name of the attribute or style (i.e., background-color))
- triggers (array of named triggers that will cause this resolver to update when called)
- defaultvalue (if the resovler function returns null, this value will be used)
Returns:
Resolver object just created
Converts an HTML template into the relevant JavaScript functions needed by the GUI class. See jsx3.gui.Template.Block for example
usage.
Parameters:
Markup – String of XML that validates against the Schema, http://gi.tibco.com/transform/
objClass – An instance of jsx3.lang.Class
bCache –
Throws:
{jsx3.lang.Exception} –
if strMarkup does not validate or objClass is not an instance of jsx3.lang.Class See Also:
Call this method during GUI class development to see how your XML template is converted into JavaScript by the template compiler.
Using the precompiled JavaScript can provide to-the-line debugging information when difficult bugs appear in your GUI class. To use for testing,
copy the JavaScript code returned by this method and paste into your GUI class. Make sure that when you paste it, it is the last
statement contained by the class. If you paste the generated JavaScript BEFORE the call to 'getTemplateXML', it will be clobbered by the generated code.
The code returned by this method reflects the exact methods and properties injected by the template class when it converts the markup
returned by getTemplateXML into JavaScript.
Parameters:
strClassName – The name of the class to precompile. For example, WIDGET. This should also be the name of the class as contained within the defineClass method where the given class is instantiated
strPrototypeName – Optional. The prototype name per the class declaration. For example, widget
strQualifiedName – Optional. The full name of the class, including the package (use if the class does not belong to the jsx3.gui package). For example, jsx3.ext.SomeRedBoxClass
Returns:
JavaScript function code
Copyright © 2001-2011, TIBCO Software Inc.