The last three methods were done in the abstract class 'ActiveTextField' and get inherited into the three subclass TextFields.
When "Required" is true, a warning triangle and the warning message are displayed regardless of the other 'visibility' properties for icons or message. I believe this captures the intention of a required field. One might want a required warning but none of the other stuff.
| Source and binaries, all platforms (ZIP): | TextComponents.zip |
| Source and binaries, all platforms (TAR): | TextComponents.tar.gz |
Uncompress the ZIP or TAR file into the directory "TextComponents".
You can download and install Maven2 from its download site.
From a terminal window, go to the Components/Libary directory.
% mvn install
This will compile the source, merge in the resources, and move the resulting JAR file into your local Maven2 repository. If this is your first time using Maven, it will also download several plug-ins which it needs. Be patient, these will only be downloaded once. Refer to the Maven documentation for the location of the local Maven repository. On UNIX based systems (Linux and MacOS X), it is located at ~/.m2, and there settings to reconfigure this location. For Windows the repository is locatd at C:\Documents and Settings\USER\.m2
Change to the Testing directory and run jetty.
% cd ../Testing/ % mvn jetty:run
This builds the Testing application WAR file, loads the Cooee and Informagen Cooee Components libraries and runs Jetty, a very nice servlet container. Log messages are sent to the terminal window which started Jetty. Maven will download more plugins in order to to run Jetty. As with the plugins above these will only be downloaded once.
From any browser enter the following URL. Press the "Start" button from the initial HTML page.
http://localhost:9090/Cooee-Test-Harness/
Maven has the notion of "Filters & Profiles". These can be used create WAR files for specific targets using a properties file to filter the source and resource files, looking for substition tags of the form ${subsitution.tag.string}
Using the provided POM file one can target the localhost Tomcat server, using the localhost profile and the localhost filter file. This is great for version numbers, log level and log filename, and a myriad of other uses.
% mvn clean package -P localhost
It's always a good idea to clean often, especially when changing profiles.
Enjoy these new Cooee components as much I as I enjoyed writing them.
Do give Maven a try! Using two terminal windows, you create a new package in one and run jetty in the other as a great way to develop WAR based application. Jetty can be stopped and started very quickly. Be warned, even though Jetty monitors your source files and can automatically reload the web application on its own, this tends to work with diminishing returns, eventually your WAR application will become unresponsive and you have to kill -9 Jetty from another terminal window.
Based on Brad Baker's "Writing Your Own Component Peers, Part 3" tutorial I have included the HTML prototype files used to develop the HTML and CSS for these components. These files can be found in Components/Library/src/prototype
This is your first stop in developing your own Cooee components.