Spiffy UI Framework

org.spiffyui.build
Class HTMLPropertiesUtil

java.lang.Object
  extended by org.spiffyui.build.HTMLPropertiesUtil

public final class HTMLPropertiesUtil
extends java.lang.Object

This is generic task for generating HTML properties files


Method Summary
static void generatePropertiesFiles(java.util.List<java.io.File> files, java.io.File destinationFile, java.lang.String packageName)
           Generate the HTML properties file based on the input source files
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

generatePropertiesFiles

public static void generatePropertiesFiles(java.util.List<java.io.File> files,
                                           java.io.File destinationFile,
                                           java.lang.String packageName)
                                    throws java.io.IOException

Generate the HTML properties file based on the input source files

GWT can server strings stored in GWT Java files and in Properties files if you use a Messages class. These work well for short strings in forms, but aren't well suited to longer HTML strings.

This task takes a set of HTML files and creates a GWT Messages class and properties files where you can access these strings from a GWT class.

This task also supports localizations by looking at the locale in the file name. For example, a file named myFile.html is assumed to be English and a file named myFile_fr.html is stored as French. This task hooks into the GWT localization framework in standard GWT.

Parameters:
files - the HTML source files
destinationFile - the destination properties file
packageName - the name of the package for the Java file. If the package isn't specified the Java file won't be generated.
Throws:
java.io.IOException - if there is an error writing the file

Spiffy UI Framework