You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Introduction

Congratulations by the time you have reached this section, you probably have mastered the basics of Ext-Scripting, you probably already can edit your local files and have them refreshed on the fly.

Under normal circumstances you, should be set up by now and you can start coding happily. However since this is a framework based reloading mechanism it is wise to dig a little bit deeper and to know what is happening under the hood and why things behave like they do. If you are interested then read on.

Helper Components

Additionally to the standard reloading feature, Ext-Scripting provides two components which hopefully will make the life of every programmer easier.

  • The Compiler Output Component
  • The Change History Component

Note currently and for the foreseeable future only Facelets as page description language will be supported by the components.

Setup

To use the components following namespace has to be included:

xmlns:exs="http://myfaces.apache.org/ext-scripting"

Example:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:exs="http://myfaces.apache.org/ext-scripting"
      xmlns:h="http://java.sun.com/jsf/html">
<h:head>

The Compiler Output Component

One of the cornerstones of Ext-Scripting is the dynamic recompilation. Every file changed, is reloaded, while you hit refresh on the browser. Now, under normal circumstances, the compiler errors and warnings are written to the console log
as following:

 Java Compiler, Error on line: org/apache/myfaces/javaloader/blog/Blog.java:30:class, interface, or enum expected30

Now, trying to catch those errors within the log is "mildly spoken" annoying and time consuming. Exactly for bypassing this problem a compiler output component can be used either in your page or preferably in a second page.

The following Video shows the compiler output component in action

  • No labels