EGL Development User Group - Group home

Customizing the HTML file for EGL Rich UI Handlers

  
The EGL Rich UI tooling found in EGL CE and RBD hides a lot of things you would normally have to worry about when deploying your applications to a server. Examples are:

  • what HTML code to include?
  • exactly what widgets are used by this handler, and how do I include them?
  • precisely what CSS files are being used, and how do I include them into the HTML?
  • how about NLS support?

When you deploy your EGL Rich UI handler, the tooling answers all those questions, and generates one comprehensive HTML file that contains all you need.

Now, what if the HTML contents is not exactly what you want?

  • What if you want to add a meta tag?
  • How about setting the local on the HTML tag?
  • Maybe you want to not include the Rich UI runtime, and ship that in a separate file?
  • What if you want to include the result into an other HTML file and avoid fighting about CSS inclusions, etc?
  • What if you want to generate the HTML on a server as part of an automated process?

Ant to the rescue! Attached, please find an Ant script that loads the deployment information for a given Rich UI handler (found in the .deploy file), and composes a new HTML file from all the components. Various options for customization exist:

  • You can edit the header.html file, and add any tags you like
  • You can edit the footer.html file, and rather than add the rui handler to the document body, add it to a given div with id 'content', for instance
  • You can even edit the Ant script itself, and change the order in which things are generated, and/or what is included.

In order for the attached Ant script to successfully run, Ant needs to be extended with the "Ant-contrib" tasks, so that we can read XML files in Ant.

Detailed instructions can be found inside the attached project. Just run the Demo.egl ruihandler for an explanation on how to run the Ant task, how to setup Ant in Eclipse, and how to customize things.

If you ever wanted to create your own HTML file, or want to do builds on a server, I think the enclosed fully documented Ant script, complete with an example, can get you going fast....

Attachments
com.automated.deployment-April-13.zip