All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jsftoolkit.doc.ComponentInfo.wiki.txt Maven / Gradle / Ivy

Go to download

The core classes for the JSF Toolkit Component Framework. Includes all framework base and utility classes as well as component kick-start/code-generation and registration tools. Also includes some classes for testing that are reused in other projects. They cannot be factored out into a separate project because they are referenced by the tests and they reference this code (circular dependence).

The newest version!
== Specifying Component Metadata ==

There are two formats that you can use to specify component metadata.  Both approaches will require that related classes (super classes, property classes, imports, and other dependencies) be compiled and in the class path.  The code generator needs to reflect on these classes to fill in information about your component.

In the following table, all constants are of class ^String^ unless otherwise noted.
{| |   |class="row_label" ! Constant !! XPath !! Default Value ! |- ! Class Name !class="row_label" | CLASS_NAME || /component/@className || '''''required''''' | |- ! Package !class="row_label" | PACKAGE || /component/@package || '''''required''''' | |- ! Component Type !class="row_label" | COMPONENT_TYPE || /component/@type || '''''required''''' | |- ! Component Family !class="row_label" | COMPONENT_FAMILY || /component/@family || '''''required''''' | |- ! Default Renderer Type !class="row_label" | DEFAULT_RENDERER_TYPE || /component/@rendererType || '''''required''''' | |- ! Component Super Class !class="row_label" | SUPER_CLASS
(^Class<? extends UIComponent>^) || /component/@superClass || ^UIComponentBase^ | |- ! Is component abstract? !class="row_label" | ABSTRACT (^boolean^) || /component/@abstract || ''false'' | |- ! Implemented Interfaces !class="row_label" | IMPLEMENTS (^Class[]^) || /component/interface || '''none''' | |- ! Required Imports !class="row_label" | IMPORTS (^Class[]^) || /component/import || see [#imports imports] below| |- ! Extra Constants !class="row_label" | Non-Reserved String Constants are passed through. || /component/constant || '''none''' | |- ! Extra Properties !class="row_label" | Any constants of type ^PropertyInfo^ || /component/property || '''none''' (See [[HtmlRenderer]]) | |- ! Renderer Package !class="row_label" | RENDERER_PACKAGE || /component/renderer/@package || The component's package | |- ! Renderer Class Name !class="row_label" | RENDERER_CLASS_NAME || /component/renderer/@className || 'Html' + Component's class name + 'Renderer' | |- ! Is renderer abstract? !class="row_label" | RENDERER_ABSTRACT (^boolean^) || /component/renderer/@abstract || ''false'' | |- ! [[HtmlRender]] template !class="row_label" | TEMPLATE || /component/renderer/@template || '''''required''''' | |- ! Head Template !class="row_label" | HEAD_TEMPLATE || /component/renderer/@headTemplate || '-head' appended to the name part of template. e.g. 'MyComponent-head.xhtml' | |- ! Template encoding !class="row_label" | TEMPLATE_ENCODING || /component/@templateEncoding || UTF-8 | |- ! Resources (Scripts & CSS) !class="row_label" | INCLUDES (^ResourceInfo[]^) || /component/renderer/resource || '''none''' (see [[RequiresResources]]) | |- ! Renderer Interfaces !class="row_label" | RENDERER_IMPLEMENTS (^Class[]^) || /component/renderer/interface || '''none''' (Always implements [[RequiresResources]]) | |- ! Render-Only Attributes !class="row_label" | RENDER_ATTRIBS (^String[]^) || /component/renderer/attribute || '''none''' (See [[HtmlRenderer]]) | |- ! faces-config.xml to update !class="row_label" | FACES_CONFIG || /component/config/@facesConfig || '''none''' | |- ! Taglib.xml to update !class="row_label" | TAGLIB_XML || /component/config/@taglibXml || '''none''' | |- ! .tld file to update !class="row_label" | TLD || /component/config/@tldFile || '''none''' | |- ! Class to register in config files. !class="row_label" | REGISTER_CLASS || /component/config/@registerClass || The generated component class. (See [[ConfigurationUpdater]]) | |- ! Class to register as the renderer. !class="row_label" | REGISTER_RENDERER || /component/config/@registerRenderer || The generated renderer class. (See [[ConfigurationUpdater]]) | |- ! TLD Short Name !class="row_label" | SHORT_NAME || /component/config/@libraryShortName || the second part of the component package name | |- ! Namespace/URI !class="row_label" | NAMESPACE || /component/config/@namespace || 1st 3 parts of the package name reversed (as the domain name) + '/components' | |- ! Tag name !class="row_label" | TAG_NAME || /component/config/@tagName || Component class name, 1st letter to lowercase. | |- ! Tag Super Class !class="row_label" | TAG_SUPER
(^Class<? extends UIComponentELTag>^) || /component/tag/@superClass || '''Must''' be a ''subclass'' of ^UIComponentELTag^. Use ^com.jsftoolkit.base.TagBase^ if you don't want to add anything. | |}
==== Imports ==== By default, the super class, any implemented interfaces, and specified properties' classes are all imported (unless they are in the same package as the generated class). Other imports only need to be specified for user specified code strings. e.g. if you specify a property's default value to be something like ^"new MyClass()"^, then you will need to import ^MyClass^. === Class of Constants === The advantage of the class of constants approach is that you can utilize inheritance and refactoring tools to make the metadata more maintainable. === XML File === The XML file DTD is: << >>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy